I used to have a problem with anger. I have found that mindfulness meditation (in my case, part Samatha and part Vispasana) works well but that the most powerful tool is compassionate meditation, also called Metta meditation.
Here's an example from http://viewonbuddhism.org/Meditations/equanimity_compassion_meditation.html:
Visualise in front of you three persons: at the left a good friend, in the middle a stranger, to the right an enemy or someone you cannot stand.
- Concentrate on the friend in front and examine your feelings towards him or her.
- Now concentrate on the stranger and examine your feelings towards him or her.
- Now concentrate on the enemy and examine your feelings towards him or her.
- Return to the stranger and realise that this person can easily become your friend or enemy in the future.
- Next, look at the friend and realise that this person may become your enemy in the future when cheating or hurting you.
- Now, look at the enemy and realise that this person may become your friend in the future when helping you.
- Again look at your friend and try to strongly feel love and appreciation.
- Now look at the stranger and try to hold this feeling towards this person.
- Again look at your friend and try to strongly feel love and appreciation.
- Now try to hold this feeling while looking at the enemy; is it really impossible to feel some love and compassion for this person?
- Try to realise that all three, friend, stranger and enemy are completely equal in trying to become happy and trying to avoid suffering.
What I personally do is use a Loving Kindness Meditation (LKM):
May you be happy
May you be healthy
May you be safe
May you live with ease
First I focus on a loved one. Then a friend. Then someone I feel neutral about. Then someone I dislike.
In the moment if someone is verbally attacking me or being otherwise disquieting I think to myself, "This person is suffering. They think that what they are doing now will ease their suffering. But it won't." And then I do the LKM silently to myself.
And at all times when I am in danger of losing my equanimity I focus on my breath.
Finally, I forgive myself if I fail and get angry. I am not enlightened, I am just another traveler on the path.