It sounds like you are exhausted and burned out. Being a stay at home mom is hard! The fact that you have recognized that you are yelling all the time is a good sign, now you have to figure out how to change that. I'm not sure medication is necessary, unless you think you're really depressed. Here are some things that may work for you:
Try to get out with the kids, meet some other moms, do some fun things together. It may seem like a huge ordeal to get the kids out of the house, but a change of scene a couple of times a week will work wonders. Being around other moms will help you feel less alone, try to find some other women to get together with. Take some time just for you. When the kids nap, sit down and rest! (if your oldest doesn't nap, make him have "rest time" where he plays quietly and doesn't bother you).
Exercise, at least a walk around the block. Also, make sure you're eating healthy, and actually sitting down to meals sometimes. Sometimes when we're hungry, we snap!
Take some time by yourself. Try to get out of the house, alone or with just your husband, at least a couple of hours a week.
Figure out what your expectations are. Do you expect yourself to be perfect? Do you think the house and kids should be perfect? Do your kids even know what you expect of them? Lowering these expectations will make you less stressed. Come up with a list of 5 or so house rules, things that are really important to you (like being kind to each other, not ruining other people's stuff, etc) Tell them to the kids and stick to them. Don't get into power stuggles with the kids, you won't win.
When you get frustrated, take a step back, breathe deep. It's so hard not to lose it, I know, but it's so important to just stay calm. I used to yell a lot, especially at my older son, now I really focus on the tone of my voice, and try to keep it calm and stay below a shout. It's really hard to stay calm all the time, but just try to focus on it, and keep it all in perspective (are the things you're yelling about all that important?) The kids will be so much happier, and so will you. Remember, they won't be little for long, so try to enjoy them!