Well, AA gets into this a bit, we all tend to occasionally throw ourselves a ‘Pity Party’ which leads to nothing good.
There are ways to conquer and eliminate undesirable thought chains, though. If slighted, and it starts grating on you, bless the person. Sounds weird, but do it over and over, and the thought pattern will quit appearing.
Other fun and easy techniques exist, on the surface they would seem hoaky and silly, but they do work quite effectively. I will explain, but only if asked, I do not want to get boorish or preachy more than I already have.
And a great prayer to repeat and dwell on, when troubled (AA uses this as a mantra, but it existed long before AA). You have most certainly seen it before, it is the Serenity Prayer:
God, grant me the Serenity to accept the things I cannot change,
The courage to change the things I can,
And the wisdom to know the difference.
‘God’ is defined as however you like, from higher self to higher power to Bearded and Saintly Old Man Sitting On a Throne, to Mother Nature, to whatever you like. (That is an AA thing, I like that viewpoint a lot.) Take your pick.
Dan, now convinced I have become boorish and preachy and a bit daffy to everyone.