Yep, you learn to separate yourself from it since it has absolutely nothing to do with you personally and is solely about the person who acts that way.
That doesn't at all mean that you can't/won't have empathy and compassion in situations that call for it, or that you can't get far by treating people with respect and kindness - - because you absolutely can get far by doing that. But when something is just uncalled for you have to be objective; you have to remain separate from it.
Professionalism and a staunch refusal to melt down and respond in kind may or may not stop the behavior, but it will certainly protect your outlook and positive sense of self.
You mentioned being "nice." Nice is what other people might agree to call you as long as they don't happen to feel upset about anything right then. It's totally meaningless. Kindness is active; it's genuinely caring and flows from a secure self-esteem. This article
is a little flowery for my taste, but I think it explains the distinction well enough - and I think a new ED nurse should consider it.
Best of luck!
Come back and let us know how it's going, here or over on the ED Nursing subforum.