How to forget the unhappy things:
When the unhappy things come to you,, don't feel it! just observe it! and then think about your dreams or happy actions in your life, it helps you to forget something bad. (from meditation knowledge)
In my little opinion:
We mostly cannot control our temper, it happens suddenly! When we get angry, we do or say something stupid without any control.
So,, you should take more attention at yourself, ask yourself that Who i am? What's my mood? .........................blah blah blah something like that.
And If it is available in your country? Take an meditation course or do some yoga,,, i think it will help you!
Good luck!