It all comes down to this: don't be an asshole.
I have four basic rules which have served me well:
1- Don't be an asshole.
2- Assume others aren't assholes; assume actions are done with love, or at least ambivalence.
3- Take others at their word until they prove otherwise. Trying to read more into people's words is a pointless, painful exercise.
4- Don't be an asshole to yourself. Take care of you.
A more positive spin: be, assume, feel, and accept love.
Japanese Zen garden in Portland. Definitely not an asshole.
When my wonderful husband is feeling down and starts ruminating on negative thoughts about himself, I remind him that no one is allowed to be mean to my husband, especially my husband!
To be clear, I do believe you need to feel your feelings, lean into them and explore them. Why do you feel the way you do? This is different than ruminating. Ruminating is pointless rehashing of thoughts without exploring and learning from them.
No one is perfect, and no one can follow this perfectly. And there are people who will prove you wrong and just be not nice for reasons you may not understand. However, I would prefer to assume love than assume ill intentions.
When someone is mean to you, or acts in a way you don't like, they're usually hurting. This doesn't excuse the behavior but helps you understand what the other is going through. Try to see things from their point of view. This will help you figure out the best way to react and get through the situation.
I can't say what was going through his mind, but I was reminded of this when I listened to the recording of Bob Woodward talking to President Trump to give him the bad news that he wrote a book that puts Trump in a bad light. From the offset, Trump clearly has respect for Woodward, which is rare for Trump to be respectful towards journalists not associated with his favorite network. It takes a turn towards the end, however I am amazed how Woodward handles this conversation. No matter your politics, I hope you can appreciate the conversation from the respectful tone that they take from the offset. Woodward disagrees with Trump on a point, but states that he "understands that point of view" and later wishes Trump, as the president, well. You can listen to the phone call on YouTube.
I hope my four rules serve you well. Do you have a personal philosophy?