1) Be willing to listen and pass no judgement.
Sometimes all a person needs is someone there to lend an ear. When there is a lot jumbled up inside often people just want to spill it out so that it makes more sense to them. Sometimes their issues will seem smaller and easier to manage when they map it out for themselves out loud. Anything is more overwhelming when you're facing it by yourself. Only give the time to listen to them when you can give your complete attention. You want to be 100% present for your hurting friend. Additionally, if their issue is hard to understand or you simply think it's "no big deal," you don't want to lose your patience with them because you're on a time crunch. It is obviously a big deal to them, so take it seriously.
2) Try to make them laugh.
If enough time has been allotted for them to be sad (which is an important aspect of the healing process), then it is important to try to put a smile back on their face. Laughter, as they say, is the best medicine. Acting silly or looking up the worst puns imaginable will show that you're at least trying and that you want to see them happy again. If you are not face to face with a person, memes and overused GIFS sent over text message would be acceptable. If you are in person, obnoxiously screeching "Lean on Me" would be a number one choice.
3) Show them all there is to look forward to.
If a person is stuck in a rut it can often times be difficult to look towards the future. Dwelling on an incident or certain sad feeling is nothing but detrimental to mental health, so try to show them all the positive aspects of their life that they might be forgetting in their time of trial.
4) Hug them.
It seems so simple, but it can be a huge game changer. Hugging releases endorphins and is proven to reduce stress. It's one of those small, wordless actions that show you are there and that you care. This speaks volumes to the recipient. And to refer to number two on this list (if they are crying while hugging you), saying "I don't mind if you get snot on my shoulder" is guaranteed to make them laugh. Guaranteed.
5) Recognize you cannot always help them.
If you've done everything you can to show them support and get them through their troubled times and they're still struggling, recognize that sometimes they just need time. They might be going through something beyond the reaches of your help. Stressing about it will not only harm you, but also make the person feel worse because they will be able to sense your struggle. They will start to feel like they're a serious problem that no one wants to deal with. And that is simply not the case.