You are going to be lied to. Someone will betray you. You will get f**ked over at some point...you can count on it. The question isn't whether these things are going to happen, the question is how you react when they do.
I have observed enough of life to know that no matter how sage the advice, people do as they damn well please. It doesn't matter what I, or anyone else, suggests. In the heat of the moment, the last thing in the world you are going to recall are any "words of wisdom" you've heard. You will lash out, strike back, retaliate, or undermine the offending party. That is what people do. It is the world we live in. And that, my friend, is the problem.
Goodness is great...if you're good to yourself. That is my only concern. You. How best to care for yourself under duress. Seldom is your initial reaction to negative events self-promoting. You simply want to "get even." Inflict as much pain as possible and damn the consequences. And there-in lies the "rub." You make matters worse. You don't think, you react. Even if that means you end up sabotaging yourself.
Perhaps this leaves you with a sense of satisfaction. You showed that old so and so! And perhaps you did. If you are satisfied with the consequences of your actions, all is well. What I have learned is, that is seldom the case. People will talk endlessly about how they got the better of someone. How they showed up their boss, spouse, partner, friend, or random human being. Yet, the very fact they are justifying, explaining, or rationalizing their behavior tends to undermine what they are saying. They aren't so sure of their actions that they don't seek validation. Why do you think that is?
At some point you may have the thought that Life is more a game of chess than checkers. And the more thought you put into your "moves," the better those moves might prove to be. I am not suggesting you lose your spontaneity as much as I am proposing you take your time when trouble calls. Breathe. Calm yourself. Try and look at the big picture. Normally (usually) there is ample time to make a thoughtful decision. Utilize that time.
Here is one common scenario: You have been unfairly maligned at work. Verbally abused. You want to storm out. Walk off the job. Who benefits? Your pride and nothing else. Instead, consider updating your resume. Start networking. Spend time researching what is available in your area. Ironically, it is far easier to get a job when you already have one. Once another position has been secured, leave your current job. If you don't feel they warrant a 1 or 2 week notice, walk out! I assure you, the sense of satisfaction you feel won't be one jot less than if you had done so immediately. And the truth is, you have handled yourself admirably. Nothing terrible about that.