Moods are contagious.
Sharing time with someone who's 'up' can rub off on you, giving you a lift.
Unfortunately however, being around miserable people can mean you end up being dragged down yourself.
Some might suggest that you should steer clear of those who are low, and whilst there may be a small degree of sense in this in terms of those you have no connection with, most of us have little choice over whether we are with our friends and family.
Indeed it would be a pretty uncaring and cold world if you simply cut off anyone who wasn't in a great place.
What to do therefore? Well I think you can sympathise with people without taking on their problems themselves. If you think about this, professionals such as therapists must have to operate like this otherwise they'd be gibbering wrecks at the end of every working day.
On a path where many may be carrying too much weight, you'll not be of much use by offering to take their loads from them. You'd soon collapse yourself.
Better to show sympathy and offer encouragement.
Which, if the original load was on your shoulders rather than theirs, is probably what you'd want too.