Okay, this first suggestion is because my school counsellor is really good. If you are still in school, tell the school counsellor. Then your friend will HAVE to go talk to the counsellor. If it is an option, alert the parents.
However, if you don't feel comfortable with that, shower your friend in affection and love, even if it seems over the top. Do as many fun things as you can together. If you can, prompt their to talk about their issues to you, but don't push it! Randomly text them saying, "I saw/did _____ and thought of you!" Add smiley faces and hearts if it doesn't seem too extreme. Make this person feel like you would die without them and that they are needed and wanted. If you are desperate, sit this person down and have a heart to heart. Tell them that you do need this friend like you need oxygen. And lots of hugs. Seriously.