You need a book called "When your kids push your buttons" - it helps you to manage your OWN behaviour in response to your children's challenging phases. I found it very very helpful (and still do).
I have huge sympathy. I really struggled when my son was 3. It's a really hard age - the terrible twos are nothing! It seems that they suddenly decide not just to misbehave or do annoying things because they're just being children or they don't understand, no, 3 is the age of "I know exactly what I'm supposed to do, and I'm going to do the opposite and then laugh in your face." or "I'm going to get undressed now, LOLZ"
Which is probably totally wrong, I mean, I'm sure they're NOT doing it just to get at us, but it feels like it sometimes. I was reduced to tears on several occasions by DS' total and utterly illogical behaviour. I felt like I was trapped in the house some days because when I managed to get his socks on, he'd take his t-shirt off (and vice versa.) In January, so I couldn't just take him out half dressed which is what always seems to be suggested. AAAAARRRGGH!!
It does pass. DS is 5 now and lovely and helpful most of the time, and I'm starting to get on with him better after finally finding the ways of dealing with things which work for him - unfortunately no magic answers here because all children are different. For us it's lots of pre-explanation and warning, trying to problem-solve rather than punish, praise/rewards, time out for ME rather than him when I'm getting to the point of exploding, logical consequences/getting them to think (e.g. with the sock thing I started to say "We're going out soon. I think your feet are going to be really cold without socks on. What can we do about that?") and picking battles/not getting drawn into battles e.g. if he wanted to wear the same stinking socks he's worn for three days, I don't care any more. Just wear some socks. And actually in a few weeks or months he was far more amenable to the idea of changing socks daily. And then we have minor, token, non-scary punishments for something really bad like spitting, hitting, name-calling etc - he gets a screen ban for 30 minutes.
I've found that with discipline it's not about trying every thing until you find something that works instantly, because nothing will do that. Instead it's about trying every thing until you find something that you're comfortable using, feel is fair/appropriate, and is practical and helpful, and then keep doing what you're doing. Give it a trial for, say, a month. If you're finding it's making certain situations worse then see if you can change that.