My mother always taught me: NEVER let someone else make their problems your problems.
Many, many people who are angry, insecure, hurt, low self esteem, rejected, guilt ridden, disappointed, tend to want to pass on their problems to others by making others feel the same way. Sometimes this is only a short term thing, an hour, a day, a week, when they are hit the hardest. This is common behavior and is easy to fall into, but try not to do it yourself.
For other people it is a life long pattern.
Many, if not most of these people would not have problems themselves if they had not unwittingly accepted them from someone else. Thus the vast majority of mental and emotional problems are passed on from person to person in the same way a germ or a flu virus is passed on.
But unlike a germ or a virus once you know you have a choice, then you do have a choice.
Recognize it is their problem, not your problem.
Reject the emotions and ideas they attempt to foster in you. Refuse to feel, think, or react, as they would have you do.
When they leave picture them dragging all their mental and emotional burdens after them. If any single thing is left behind, no matter how insignificant, picture kicking it away from you.
You don't want it.