The first step is to do your best to remain calm. When you keep a level head you are better able to keep control of the situation. Remember that you should permit your child to have angry feelings, but limit angry actions. When you're in control you can help your child find self-control. Model proper skills.
Children learn what they live.
If you find that you are reacting in unhealthy ways to your anger perhaps its time to make some positive changes. Read a book on anger control, take a class or join a support group. When you control your anger its easier to teach your children how to control theirs. Affirm your love. Kids often judge themselves harshly after a bout with anger.