1. Own your space.
That's it. Don't let other people define you. What this means in practice:
* Don't take a job if you know its filled with stupid people. An an example I love writing JavaScript/TypeScript applications. I super love it, but I will never do it for work ever again. Most people who write that code for a living suck at what they do and are hostile/insecure about it. I would rather flip burgers than work at an adult day-care parenting the toddlers who are too incapable to use a ruler or write an email.
* Always achieve supervisor support. Know your boundaries and always support your boss because you expect them to support you. If your leadership sucks, or worse is toxic, you are in a bad situation. I would gladly take less pay to work with fantastic people. In my case I am in management and work with another manager. That other manager was toxic so I, as politely as possibly, told him to go fuck himself and immediately made my boss aware.
* Be ethical. If you are in management be a shining example for your people to follow. Never assign tasks to your people you are not willing to do yourself, even if its scrubbing shit out of blown up toilets. Never be a hypocrite. Always be aware of and care for the emotional needs of your people. The goal is to retain your people as best you can even through stressful projects.
* Do what makes sense. Most people, surprisingly, are incapable of this. Most people strive for what they perceive as externally validated solutions from peers they have never met. This is autistic bullshit that drives people to hate you. Instead, follow the evidence and save your team from other people's insanity.
Doing these, especially the first 2, are what pulled me out of my rut.