In college, I gave a workshop on office politics and how to navigate them. The message, which I developed after having researched the topic extensively, was not to avoid engaging in office politics. For all of those people who can't stand double negatives, here's what I mean:
Engage in office politics.
Many of my peers weren't too happy to hear this (because really, who wants to have to work for a company riddled with office politics?), but office politics are not always bad.
Office politics in the known, traditional sense are the actions that some people engage in such as gossiping, back stabbing, sneaking, sucking up, and putting blame on coworkers. This is most certainly not a professional or even remotely ethical way to conduct yourself in the office.
I'm not asking you to engage in office politics by slandering somebody's reputation at the water cooler, but there are ways that you can engage to help your career.
Every time you engage in any sort of small talk or pleasantry, you are engaging in politics of a relationship. Even if you genuinely enjoy the person and their company, it's still prima fascia office politics (if it's being done in the work place).
Just because this definition of political behaviour doesn't align with the traditional sense of office politics, it still very much is. It may feel like you aren't engaging because you are being nice and aren't thwarting the efforts of others, but all of your interactions with co-workers, your boss, and those around you are political.
You can use this to your advantage. Engage in good politics; ones that get people's motivation going, their creative juices flowing, and that will motivate them to work with you, not against you.
Office politics are the only way of getting ahead. Knowing your co-workers strengths and weaknesses and supporting them in projects to help make up for them will make you look good too; if the project isn't adequately completed, and you were on the project team, that looks bad on you.
Don't Wallow in Misery
In my first internship, I had a very difficult relationship with a coworker. We had different working styles, and he engaged in some office politics in the traditional sense of the word. As a result, I reacted negatively. I felt like I was being attacked and being blamed for things that I didn't do.
It wasn't until my last month at that internship when I finally realized that I needed to adjust my attitude and start playing good office politics. Instead of being miserable in my position and feeling victimized by a coworker, I started trying to come at the issue in a more positive way.
As a result, I was much happier to be at work (and I don't think that had too much to do with the fact that I was only a month away from leaving), and my coworker started reacting more positively, too. Avoiding office politics all together was damaging my career, and self esteem because I didn't want to be at work and I wasn't standing up for myself. Engaging in negative politics is never beneficial, but engaging in good office politics really helped my situation.