Here are two good articles about handling other people's negative states of mind.
David Hamilton says in http://drdavidhamilton.com/how-to-deflect-negative-emotion/
"Just as you can catch a cold by hanging out with someone who has one, so you can actually catch emotion too.... You don't just catch emotion from others, you transmit emotion too. Other people catch what you are feeling. So if you want to help others to be happier, one of the best ways is to work on your own happiness. Then they will catch it from you."
The second article looks at how it is possible to have too much empathy: