I know this is not easy, but as long as the hatred is purely verbal remarks, one way I try to not let hatred affect me is by detaching -
1. emotion from the word, and
2. qualification from the hater
What I mean is this ...
Every word has a meaning because we associate a meaning to it. Part of the meaning is strictly factual. For example, the word negro is short for negroid, which is an anthropological term for one of the three races. The other part of the meaning is emotional. For example, the word negro was used too often as a tool of hatred by one community of individuals against another and that hatred got associated with the word negro. Detaching the emotional response from the word is one way to reduce the impact that the hater intended to be felt. In other words, do not let the hater succeed by becoming affected by the hatred.
The second thing to contemplate is the qualification of the hater. What is the hater's authority to judge you? Is the hater the president of the US? Is the hater the UN Secretary General? Is the hater a Nobel prize winner? Is the hater a judge at the International Court of Justice? How many PhDs does the hater have? If you observe, most haters are losers. The very fact that they have time to hate you and to make it known to you in words implies that they have nothing else meaningful going on in their lives. These are pathetic souls. Anyone with the ability to speak can say something, but that does not mean that the something they say has any meaning or value in real life. Everyone has an opinion, but the opinions of most people have no value to your life. Just as you do not bark back at a barking dog, go on about your life and let the barking dogs bark.
We cannot stop other people from doing everything they do. We can however control our own response to what they do such that our responses will better our lives.