Learn how to recognize that you're could be getting close to that crazy feeling but not feeling crazy yet. Then experiment with different things that bring you back to center.
For me I've found that it really helps if I can let go of feeling that I have to do or to complete anything. I stop what I'm doing and do something with my daughter and now my grandchildren. I'm the sort who wants to finish whatever I've started before I stop. If I'm doing dishes, I want them in the dishwasher, the sink and counters clean and perhaps even the floor swept. This doesn't work with children or for me even being on time when I have an appointment. so stopping and playing with my child was not easy for me to do. However, pushing ahead only leads to whiny people, both the children and me, and eventually to my crazy yelling.
A 2yo needs lots of attention. They also need to be reassured often that they are loved. The lack of attention, especially if you're in a different room and can't be seen by them, can cause them to misbehave or get clingy and whiny. So, before they get this way, give them attention. Having them "help" or at least be in the same room helps. Divert their attention to a new activity before the old one gets boring. But, for me, the most important thing to do was to take frequent breaks from what I was doing, letting go of my goal to be done by a certain time or to even doing the task at all, and getting involved with the toddler/child was the most important thing that I could do to stop feeling crazy.
Also, it's important to leave when you're feeling so crazy you just want to leave. It's OK to take a break for yourself. Try to do that before you feel crazy. While he's quiet and playing, sit down and do something for yourself. The dishes will always be there. It was difficult for me to let go of the need for a neat house and a clean sink. Now I'm having to relearn wanting a neat house. I'm still wanting a clean sink. :):)
I agree with Kim C. and Jennifer C. Mom's need time away from their children. Plan time for a regular break and take that break before you need it. Find someone who will watch your son so that you are completely free of the responsibility of watching him. Go to a movie, go shopping, take a walk, work out at they gym or community center. Regularly do something that you enjoy doing. I used to fix dinner for my family, leave my husband or mother-in-law with the kids and go out to eat my dinner. Some weeks I did this 2-3 times. Other weeks not at all, depending on my mood.
And, I believe that we are hearing an over-emphasis on not watching TV in reaction to the reality that too many children watch way too much TV. Moderation is the key. And I strongly believe that having a child watch TV is much healthier than having them deal with a "crazy" mother.
You are not alone. It takes time to learn how to manage ourselves and our baby/toddler/child so that we feel crazy less often. Too often, as young mothers, we get so caught up in doing things right that we get lost along the way. We focus on others to the detriment of ourselves. If we don't take care of ourselves first we do get crazy and feel inadequate. Take 10 deep breaths anytime that you're feeling tense. That will help too.