When a friend is grieving, what they need most is your support and understanding. Express your sympathy and let them know that it's okay to grieve and feel the pain. Share a comforting message acknowledging their loss, and offer your presence and help in any way you can.