Apologize for your behavior, not for yourself. You might tell your child, "I've been thinking about what happened and I don't like what I said or did."
Give yourself a momentary time out. You might say, "I'm sorry, I'm not thinking clearly right now. Give me a moment and I'll get back to you."
Ask your child, "What could I have done differently?" Ask her for help in figuring out what to do, and be open to her suggestions. You might say, "Did I make a mess of this?" Kids love to hear parents admit they are wrong.
You might also ask, "What could you have done differently?" In a non-accusatory way, review what occurred. Use this opportunity to discuss what you and your child could do differently next time.
Next time, try joking instead of over-reacting. You might say with a laugh, "Are you going to drive me totally crazy again?"
Remember that no parent is perfect. Think about what provoked your response. Also think about all the good things you do as a parent. Talk to a friend about what happened and find out how she might have handled it.
Think specifically about how you might behave differently next time. What it is about your child's behavior that pushes your buttons? Is there something you can do or say that would change the way you react? You might try taking a deep breath before you speak, or walking out of the room until you figure out how you want to react. Think about this when you're calm: the heat of the moment may not be the time to fix this problem, particularly if it's become a pattern.
Learn from your mistakes - and move on!