Additionally, if your thoughts are affected by a medical condition, I would suggest calling a nurse hotline through a health insurance company or university. They can often confirm or deny if you should seek emergency care ASAP.
I saw someone who was very clearly depressed streaming the other day. They weren't responding to chat. Crying. Fetal position on the floor for 7+ hours. Very depressing social media posts, etc.
But I did not know this person. I did encourage them to call, however it was a difficult message to compose. You don't want to make them feel like they're a burden or weak ("call if you need someone") and some people may need encouragement to actually pick up the phone.
So in a situation with a stranger online, who may not see or respond to your message, what would you say?
What a lot of people don't understand is that a friend who might be considering suicide doesn't need to be "fixed", or to be given a bunch of quick solutions, or worse to be told "just get over it". What they need is someone who is willing to listen without passing judgement. And if necessary, to provide that friend guidance in getting to a safe place where those with experience can provide care.
For disclosure, I am not a trained counselor. I've had various, very short, training sessions for several close friends and relatives so that I would know what to do, and more importantly what not to do or what not to say.