Have a look at this.
I've been there too, shouting at the kids for no reason, making them feel like shit and myself in the process. It just takes one little thing and I snap. I tend to go on and on and on at them too. I just don't know when to stop.
Now I find that when I feel my anger rising, I pinch myself on the back of the hand and go into another room. It might take as long as half an hour for me to trust myself again, but if that's how long it takes....
I also sat dd down (she's 8) and explained to her that sometimes mummy feels down and sad for no reason and that sometimes I get angry. I explain I'm more angry at myself for not cheering up and being happy. And when I do get angry, not to feel that she or her brother have caused it, but to understand that I'm feeling sad and to leave me alone for a little while. I explained it like a kettle slowly coming to the boil and then whistling as it boils.
She took it all in and understood perfectly. So now when I get angry she does take herself out of the way and I've learnt how to deal with it better. Try it with yours.