“Kindness is invincible, but only when it’s sincere, with no hypocrisy or faking. For what can even the most malicious person do if you keep showing kindness and, if given the chance, you gently point out where they went wrong – right as they are trying to harm you?” Marcus Aurelius, Meditations.
‘Do unto others as you would have done unto yourself’ is a related mindset. How others treat you is not in your control. But you can relieve yourself of the burden and stress of worrying about what others think of you, or of losing face in the heat of conflict. Choosing to walk away graciously and gracefully is often the kindest thing to do.