meditation is the answer.
That isn't by itself enough to effectively regulate emotion in oneself. You need to cultivate the habit of checking on yourself (how am I? right now? and just before?), understanding what is needed and making the adjustment. All three parts have to fire, or it won't work.
Mindfulness is the first part, awareness is the second, but then you need to actually go ahead and change how you feel, and for that you'll need some breathing exercise or medication. Eating right and exercising helps a lot with this.