If you believe their life to be in danger, please get them help immediately. If they have a therapist, help them reach out to that mental health professional for urgent support. If they need medical attention, you can help them get to the hospital.
You can also support them by listening carefully to feelings they want to share, making fun plans for the future, and letting them know they can talk to you any time they're in crisis.
The 988 Lifeline provides 24/7, free and confidential support for people in distress, prevention and crisis resources.