Most companies rank people and change the ratings the initial manager gives them because they have only so much money to go around. If your rating did not survive the ranking process, then you have to work to have more visibility in the organization and your boss needs to have a reason to go to the mat for you when the senior management team discusses this.
There is nothing in any organization where you more clearly need to play the office politics game than in the performance ratings process. Sure you can opt out of it as you said you did because you didn't like the process. That makes it easy to rate you low and not give you a raise, so it is a stupid move, but hey your own opinion is more important than management's in getting raises any isn't it?
Your immediate boss either
- thinks the other guys who did get raises did better than you (He
likely had to put all of you in the order he would give raises),
- he has no political clout in the company (which is why your rating didn't survive),
- or you personally managed to piss off someone senior to him.
In the first case, you need to talk to the boss about what you can do to improve your rating for next year. You will likely need to make some changes to go from the no raise to the raise category.
In the second case, you will need to move to a different organization in the company with a more politically astute boss or you will need to raise your image among senior managers so that they like you and don't downrate you. Try to get involved in cross functional tasks as a good way to meet and impress higher-ups.
In the third case, you will need to improve your image to whoever is blocking you. Depending on how much you annoyed those people, it may or may not be possible in this company. Based on the fact that this happened over more than one year. it is likely that you have destroyed your reputation with senior management if this is the cause.
In any event, you will never do well as far as raises and promotions until you learn to play office politics. And you need to learn to control that anger and not refuse to participate because you are angry. Letting people know you are angry at work is rarely a winning strategy unless you already have a lot of political power either from your own efforts or positionally. (CEOs have much more latitude to get angry than junior developers for instance.)