So, don't take it personally at all, because they do that to everyone. Stop assuming that you are being targeted. Because mostly, this assumption itself is the root of our problem.
Try to look beyond his/her harsh words, body language, attitude, position, or status. See where all the wrath you have to tolerate comes from. Kindness and compassion are more than just words you can put to use here.
Own your fears and that unhappy corner in your mind which is triggered by a few unpleasant words. Treat it. Treat the discontentment within. And, you will discover a more beautiful you!
Observe yourself, acknowledge the fact that you feel hurt. More often, it is because we tend to reject the fact that we are hurt, which is why we cannot handle criticism in a mature way. Once this is known, you begin to respond peacefully.
Try to imagine this person to be a kid. And do what you would have done to deal with your kid's tantrums. As soon as they begin to shower you with their gloomy thoughts, start counting backwards. 100, 99, 98, ... and so on. Sounds stupid? Then, you must give it a try.
Is that person and his pessimism eating away all your precious time and joy in life? Then, change the focus of your life. There are so many other good people and good stuff to pay attention to.
So, find out the good in that person, look at the larger picture, or take it as a chance to find your discomforts and improve your own self.