The Buddha teaches the brahmin Asurindaka Bhāradvāja, who had approached him with harsh words, how to respond to anger and how to win a hard battle.

Asurindaka sutta - Asurindaka

At one time, the Blessed One was dwelling in Rājagaha, in the Bamboo Grove, the Squirrels' feeding ground. Then, the brahmin Asurindaka Bhāradvāja heard: "It is said that the brahmin of the Bhāradvāja clan has gone forth from the household life into homelessness under the ascetic Gotama." Angry and irritated, he approached the Blessed One; having approached, he abused and insulted the Blessed One with impolite and harsh words.

When this was said, the Blessed One remained silent.

Then the brahmin Asurindaka Bhāradvāja said to the Blessed One: "You are defeated, ascetic! You are defeated, ascetic!"

"The immature person thinks they are victorious, when by speech, they bellow harshly; But true victory is theirs, who patiently endure—knowing the truth.
Worse off is the one, who retaliates against an angry person; Not retaliating against anger, one wins a battle hard to win.
They act for the benefit of both, their own and the other's— who, knowing the other is enraged, settle themselves with mindfulness.
Those who heal both, themselves and the other— are thought to be fools, by those unskilled in the Dhamma."

When this was said, the brahmin Asurindaka Bhāradvāja said to the Blessed One: "Excellent, venerable Gotama! Excellent, venerable Gotama! Just as if one might set upright what had been overturned, reveal what had been concealed, point out the way to one who was lost, or hold up a lamp in the dark so that those with eyes could see forms, in the same way, venerable Gotama, the Dhamma has been explained by you in many ways. I go for refuge to the Blessed One Gotama, to the Dhamma, and to the Saṅgha of bhikkhus. May I receive the going forth in the presence of the Blessed One Gotama, may I receive the full ordination."

The brahmin Asurindaka Bhāradvāja received the going forth in the presence of the Blessed One, he received the full ordination. Having recently received full ordination, the venerable Asurindaka Bhāradvāja, dwelling alone, secluded, diligent, with continuous effort, and resolutely, soon realized with direct knowing in this very life, for the purpose of which sons of good families rightly go forth from the household life to the homeless life, the unsurpassed culmination of the spiritual life, and having personally attained it, he dwelled in it.

He understood: "Birth is ended, the spiritual life has been lived, what had to be done has been done, there is no more coming to any state of being." And the venerable Bhāradvāja became one among the arahants.