Hi Mama,
First, take a moment and breath. It's ok to make a mistake. The important part is to realize the mistake and fix it
First, tell your children you're sorry. Not only will you feel better, but you will teach your children everyone makes mistakes and that to fix those mistakes your own-up to them.
Next, learn to take time outs. I do not use typical time outs when I work with kids nor to I recommend them to the parents I work with as a Parent Coach. I only use time outs when I or the child is out of control, and then it's more of a system of collecting yourself. For me, I'd walk away, sit and breath. For the child, I have them go to a different area, (a change does wonders), and have them clam down. When the child or myself feels in control, we all come back & talk.
Teaching your children to recognize their anger cues is important for proper development. You can do this by modeling the behavior, "Mommy feels overwhelmed, I'm going to calm down now." or providing them the words the do not have, "You're hungry and tired after a long day, but hitting Mommy isn't ok. Do need to go calm down for a moment or do you need a hug?"
I hope this helps. Forgiving yourself for errors is huge, it's ok to lose it once in a while.
R. Magby