I come from a home with loving, but arguing parents and I hated it, and I was determined I never wanted any kind of shouting in the home for my kids (my parents love each other, but my dads a wind up merchant and my mum falls for it every time, although she's getting better at ignoring him as she's gotten older :-)
I suppose for me I apply the same theory to kids as with adults, in my view if you're arguing with someone and they start to raise their voice, you've won the argument as they're losing control. I've also spent a lot of time working at a public facing desk and have realised that the best way to wind someone up who starts shouting at you is to smile more and be very calm :-D
So when I'm dealing with my eldest (now 4) I always focus on being calm, I concentrate on that throughout the whole incident. I made sure I got calmer and calmer the more outraged he got and I'd keep my voice low and even and made sure I had eye contact through the entire event (esp. with tantrums).
I found that distraction was one of the best things to get through the terrible twos (or threes - doesn't get much better - sorry!). E.g. when you realise your little boy is incapable/unwilling to listen to you and stop hanging on your neck, after the second (or third) time, get up and draw his attention to something else, a toy (let's play with your lego!) a new game (I want to play football - lets go!) anything that will take his focus off the game he was playing.
I also did the 'choices' thing, e.g. You can continue hanging on my neck, and if that happens, mummy will get grumpy and won't play with you and you won't get (whatever it is he likes) or you can stop hurting my neck and we can do (whatever it is he likes doing) now. It's your choice, what do you want to do? We started doing this with DS1 when he was about 18 months and found it a really effective way of diffusing situations and getting him to decide outcomes (toddlers like the sense of having control).
When my son is tired (even now) his behaviour gets very testing, and I know it's because he's tired, so I try to engage my sympathetic gene whilst telling him not to poke the stick in the cats face as she won't like it and it could hurt her. If he's not listening, I suggest an alternative game for us to play (often he plays up when he's bored and thinks I should be playing with him).
We all feel like sht mum's at times, however I think the fact that you feel like sht is a sign of how much of a good mum you are (if you know what I mean). Good luck, it ain't easy :-)