One of the most powerful mindsets you can have is "I deflect negative energy". It is the concept of not letting negative people or situations steal your joy, and it was a lesson recently reiterated to me by one of my mentors, Dave Kovar. It's easy advice to give, isn't it? The real trick is having strategies that help you apply it.
First off, avoid environments and situations that are likely to present negativity to you. Dave shares a great story about this. Years ago someone came into his Karate school asking about lessons in self defense. The gentleman had a black eye and stitches. He said he'd just been in a bar fight, and was on the losing end. "So," he said, "I need some self defense lessons because every time I go into that bar I get beat up." "Well," responded Master Kovar half jokingly, "Why don't you stop going to that bar?" "Oh," said the guy, "I never thought of that!" The question is: what "bars" do you need to avoid?
Next, just don't talk to, associate with, read facebook posts of, or take any notice whatsoever of negative people. Negative people are just that - negative. They are septic. They don't have nice things to say, and nothing you can say to them will turn them to the good. Just avoid them.
Lastly, control your focus. When you find yourself focused on negative energies, count your blessings. Focus on things that are true, noble, right, pure, lovely, or admirable... anything that is excellent or praiseworthy. Focus on things of "good report". That's good advice from another mentor of mine.