Have you tried hitting the air? It would probably be a rather ridiculous scene to you. A great kung-fu master told his pupil. "Stand there. That one's gonna hit you. You are not going to receive it. "As a teacher?" That hit is not for you. It is in your direction, but it is not for you "
There is a similar principle was popularized by Don Miguel Ruiz. “Don't take anything personal." What does this mean? If you don’t make an attack, a criticism, a mockery, a comment or even a compliment yours, this can’t affect you. How come something may disturbe you that was not even for you?
It sounds simple. It requires practice and awareness to master it. Once a teacher said "Whenever someone speaks badly of you, or directs an aggression towards your person, put before you an imaginary clown, let that clown get everything”. It’s a weird technique, but it might be useful. The idea is to learn to detach ourselves from the image we have of ourselves. If there is no image, there is no target to attack. The air has no shape; it contains nothing, so it cannot be pointed.
The next time a comment seems offensive to you, just think that it was directed to the same person that said it, because it is almost always a reflection of what the other have inside. As Buddha once said to someone who sought to attack him, "I see that you bring aggression and hatred for me, but I do not need it and I will not receive it, thank you." The aggressor ended up becoming his disciple.