Meditation is a good advice. I like those techniques that are based on some physical actions in order to change your mental condition.
May I add:
Voluntary smiling. When you force your smiling muscles to contract you stimulate mental happiness.
Breathing. Some deep breaths before reacting might be very beneficial for you. I affects the adrenalin in your body and might reduce the power of your limbic based brain power so you can think instead of just reacting.