Call the National Suicide Prevention Lifeline 1-800-273-8255 call the suicide hotline to help them. listen to them, sympathize with them. help to provide understanding of their situation if youve been in a similar situation. if its something that's ongoing, they probably could benefit from therapy (for low- or no-income people this could be very ow-to-no cost. idk what the websites are for all of the states, but i think in colorado it's www.peak.co.us one thing that may help is that they may feel the lack of control. and they cant control others, but they can control themselves. purpose to life is important to happiness. helping others or doing something for somebody else, selflesly, can give a very positve reward, and can help to give purpose to life.
Be there for that person. Don't just tell them that you care about them (of course, you should tell them sometimes) but show them that you care. Hang out with them and spend some time with them. Make sure they laugh and they enjoy the time you spent together.
If it's something like bullying, there's not much you can do except find some way to get those bullies to stop bullying your friend.