Depends on the underlying cause.
And just to note, I don't like the word "mean". It sounds weak and pathetic.
In any case... how I respond to hostility depends on whether I believe it is rooted in malice or ignorance.
If I reckon someone is having a go at me because they want to annoy me, because they hate me, or just because they feel like being a dick ..... funnily enough I don't tend to mind. The old don't-feed-the-trolls routine. I just tend to blank out actual malicious behaviour.
BUT if someone is giving me trouble due to their own fundamental stupidity, misunderstanding, or otherwise just didn't bother to take the time to understand something and are just immediately resorting to sh***y behaviour... well, I still try not to respond, but it annoys me. I generally want to stick a knife in their throat and kill them. I don't really have an intermediary stage. "Hitting" someone has a different meaning to me. When someone annoys me, I want them dead. Immediately and permanently.
And obviously, this includes all the little things like spoking in public too close to me, speaking too loudly or in an unpleasant accent, licking a finger before turning a page in my presence, trying to pass me on my left side in the street. A whole collection of things the average person doesn't even think of nor recognise as "a thing" are sufficient for me to want them dead.
So yeah. Short version : Malice is forgiveable. Ignorance is not.