First one.) Listen to what they are going through and dont judge them. Also, talk to them in a calm gentle way so they dont feel frazzled or scared to open up. Dont pressure them.
Second one.) Ask them if they want to talk to someone more experienced. Tell them that its okay to wait a little bit before opening up to adults or other people for help.
Third one.) If the person doesnt want help but seriously needs it, go to a responsible adult and tell them about the problem. If your friend does want help, then take then to a trustworthy adult and explain the situation.
Hope this is helpful to you some^_^ have a great day!!