Since this comment became somewhat popular I'll post the entire guide here. I wrote this a while ago for someone else.
It summarises some of my own struggles after being let go from a company I cared for deeply.
Not all companies and bosses are the same, but even well intentioned people can have some of these traits depending on the situation.
The end goal is to have a good work/life balance and not work yourself to death.
* Put yourself first no matter what. No job is worth your mental and physical health. If you will work for your own company some day maybe then it's worth putting in the extra effort. Maybe not even then.
* Respect yourself and make sure they respect you.
* Do not allow to be bullied in the future. Bullying can come in many forms. Sometimes it's an inappropriate comment from a colleague or boss. Make sure you say it out loud when it happens but do it respectfully, in a serious tone: "I'm very surprised of your comment <name>", "This is a professional setting <name>". "We are at work here <name>".
* Do not allow them to overwork you. Most of the time you won't get paid for working late and no one will appreciate it. Finish your work at 5PM. If your contract states 9 to 5 then that's exactly what you are doing. Stand up from your desk and leave. Ignore snarky comments from colleagues or bosses. There's absolutely nothing they can do legally to make you work more than you have specified in your contract. They will whine and moan about stuff that needs to get done ASAP. Stuff will get done regardless of you leaving now or an hour later.
* Do not be intimidated into thinking you did your work poorly. I've seen this happen many times with employees being guilt tripped, especially the younger more junior employees. You are a professional and the work you do is important for the company, you do it with pride and to the best of your ability.
* Beware of gaslighting. Some bosses can be incredibly manipulative and will resort to all sort of tactics to get more from you. They can have you attend more meetings than necessary because there's a deadline coming up for them. They might want to shift the blame to you when something hasn't been done in their department, even when it wasn't your job in the first place. When this happens clearly state that it is not your responsibility and that you do your job well and on time.
* Stop caring too much about company problems, and focus on your own work. You should not care if the manager does his job poorly or if the company is not doing so well. It not your fault. They are running the business poorly.
* Raise issues early and in writing. A quick email to HR or your boss depending on the situation can work well. Exercise diplomacy and keep a copy - print to PDF works.
* When you are sick take sick leave, do not allow to be bullied into coming in to work or working from home instead.
* Do not divulge too much about your personal life at work. This can sometimes be used as leverage against you. Loose lips sink ships.
* Leave work problems at work. This is easier said than done but at the end of the day you shouldn't care about what happens there after you have left for the day. Enjoy time with family and friends.
I have been manipulated, bullied, devalued and treated poorly at work by Machiavellian bosses. I would never allow these things to happen again.
I've had recruiters trying to low-ball me from the very first call with a smaller salary figure than the one they had advertised (or with completely different terms than advertised), by suggesting that my skills were somehow not up to scratch. I respectfully told them that my skills are exactly the ones stated on the CV and hang up.
Good luck and try to stay positive. Focus on yourself and what benefit you get out of work.