The Blessed Buddha once said:
There are, Bhikkhus & Friends,
five methods to Quell
Hate & Anger.
Which are these?
Towards any person against whom hatred and anger have arisen,
1:
One should quickly direct
mind to, cultivate and develop:
All-embracing, gentle and kind friendliness towards that person...
2:
One should quickly direct
mind to, cultivate and develop:
compassion & pity ... mutual joy & ... indifferent equanimity ... or
3: One should avoid & not pay
that person any attention at all ... or
4: One should remind oneself of
the law of ownership of kamma or 5: One should know that this
person too is the owner and inheritor
of his actions, that he is created by them, that his actions are his
future foundation, & that he will have both his good & bad actions
as his future... In these
5 ways one may overcome hate and
anger...
Source (edited
extract): Numerical Discourses of the Buddha.
Anguttara Nikāya AN 5:161