In daily life, we keep developing complaints about other people. What is the formula for saving oneself from this complaining mind-set?

My formula is, ‘Save yourself.’ This is the only formula and there is no other formula. This has been given in the Hadith, Alaika nafsat (Baihaqi) Save yourself.