I was in the same position. I tried to keep at it, determined to do well by my own standards.
I was working with a "team" and the leader, my boss, had his favorites... I apparently was not his favorite.
Being a nice guy, I helped another coworker with a project... gave up half an hour or my own time to help. My idea for this guy ended up saving the project $700,000. My boss did not like this because he had something against the guy I helped. He was actively trying to have this guy fired and I was not helping at all, so there you go. I was not given any support from my boss and team mates, and felt very alone. I truly have no talent in seeing the politics at work. I just want to be part of a team, working together and doing a good job.
Another "team mate" was an ass and tried to throw me under the bus. My boss was on this guy's side. Believed him, didn't even talk to me about these things, and quickly passed judgment telling me he was disappointed in me.
All this plus other things going on at work made me hate my job, and at some point I lost the desire to do anything to try to make it better. I was sick most of the time, anxious and tense, getting migraines and hardly any energy to do anything constructive for myself outside of work.
I quit my job and I am currently trying to find a balance between $$ and happiness / health that works for me.