The most important thing you can do is take care of yourself. Your own physical and mental health are prerequisites to caring for anyone else and being a part of extreme psychological distress of someone you love takes a huge toll. Lean on whatever practices you already have to stay healthy and content. Remember that what you're witnessing is not your fault and not in your control.
The best way I've found to be supportive are to be present as much or little as I can without compromising my own being. Intervening, escalating, and trying to reason with people in this state seldom has the intended effect and often has the inverse effect. As much as you're able, accept your friend for who they are in this state, listen without judgement, and validate their experience without cosigning it. Stay in touch with their family and close friends and work together to seek medical intervention if they risk the well-being of themself or others.
I'm here if you want to talk about it on a call or over email. Same handle at gmail. Be well and keep reaching out for support.