If it works, great. If not, start again. Two important messages come across to children when you use this approach. First, no problem is so great that you cannot solve it. Second, you are responsible for your own behavior.
All parents get angry at times.
But we can all learn to control our anger. Find a way to help yourself calm down so that you do not do or say something you will be sorry for later. If your children are old enough to be left alone or if there is another adult with your children, go somewhere else until you calm down. Tell your children what you are doing. Take a walk.