First off, this is childish thinking. It doesn't matter how bad or good the management is. You are responsible for YOU. And YOU alone.
If you are farting around, wandering in 5 minutes late, doing as little as possible all day, playing candy crush on your cell phone, or any other type of misconduct.... then it doesn't matter what the manager is doing. He may be stealing from the company... might be a jerk to the employees... could be the most lazy person in the building.... none of that matters.
You are responsible for *YOUR* actions. Not his. And him being bad, doesn't justify you being bad. Children think in terms of "well he's a bad person, so I can be terrible too"... no, time to grow up. Time to grow a pair, and become and adult.
no, it's a matter of limiting your commitment. if you are giving more of a **** about the future of that company than the people running it are, you are kind of wasting your effort that could be spent on better things. I used to bust my ass to keep companies afloat when the owners were clueless and didn't give a ****, now I don't.
I never care about the company. Never. What I care about, is knowing that I did my best. I don't "bust my ass" ever. I just do my best.... and that's that.
Yeah, if you kill yourself for the company, you'll be bitter and angry. Sounds like that is exactly what happened to you.
I work for two people.... Just two. I work for G-d in Heaven, and do my best for him, and I work for myself, and do my best for me.
If the company burns to the ground, then I'll collect my paycheck until I'm laid off, then find another job. Which I have done numerous times.
Live life dude. Be happy. Don't worry about the boss, or owners or whatever.