You have to get yourself under control first. You can do simple things like breathing mindfully or counting backwards slowly from 105 to 92.
Look at the process as if you were on a plane and the oxygen masks dropped down. You put your own on first before you can help the child. In order for this process to work like that you need to see situations that provoke anger as situations where you have the chance to teach the child or do something else positive for him, and not a situation where you and the child are in direct confrontation and one must win (which gives rise to anxiety that you should be the one who wins and the fight reflex kicks in - fuel to the flames).
(As well as breathing or counting, you can visualise some helpful or positive symbol like the oxygen mask.)
Look at it as if there's plenty of oxygen (= opportunity/time to teach the children, and self control) to go round and as if you had to get that oxygen yourself before you can be of any use in supplying it to those who depend on you. When you start to look at it this way you find that you are mentally in control. Situations that arise are seen as teaching opportunities and not fight or flight incidents. They can be the glass half full and not the glass half empty.
It can also help, if you find your interactions tend to be more negative than positive, to make a conscious effort to praise, to catch the DCs being good, even to make positive remarks to them about things you see when you're out and about or at home -- 'I like the way the gale is blowing the trees around today', 'I like the way this one corner of the sitting room looks so tidy and quiet' - you may well find yourself grinding your teeth and feeling very self conscious but you can train yourself into a more positive and less stressed mindset.
Mentally, before getting to the place where we see ourselves in teaching mode, we should be aiming to:
--recognise that the other person is having a problem and it is their problem, not ours;
Creating boundaries around ourselves and recognising the boundaries around others is needed here. Boundaries are not just about imposing rules on others. Having boundaries for ourselves involves acknowledging the separateness of other people, their autonomy and their separate feelings.
--recognise that their behaviour and words are not about us;
This involves casting off defensivenes and anxiety. It requires examining the expectations we may hold that we should be a perfect parent, examining the related assumptions we may have that a tantrumming/un-cooperative/whinging/mischievous child is somehow reproaching us for our imperfection, thus feeding our fear, guilt and disappointment in ourselves, all of which keep us going around on our little gerbil wheel of reaction.
Some really good insights and tips here.