Do you ever wonder what to do or say when someone you know, whether bosom friend or barely-met acquaintance, is going through a terrible life-changing event?
There is no one good answer, but to be guided by the Spirit.
However, I know that the times I've been helped the most are the times when I've been just been listened to, hugged, and then simply told, "I'm so sorry." No one expects you, as a friend, to make it all better. But acknowledging the pain, being willing to "mourn with those who mourn," to help weather the pain even for a brief moment, is one of the most powerful things any human can do. It lets a person know they're not alone. And that's what most feel in times like this, even when it's not true.
It doesn't matter how a person got to their point of pain, whether their circumstances were preventable or not, what matters is that they hurt. Don't let anyone hurt alone. Put aside whatever personal beliefs about their situation or self-consciousness you might have, and just be with them.
That is what the baptismal covenant means, when we become members of His church. That's exactly what Christ would do, if He were here.