It’s never easy to go through the phase of losing someone close and if it’s a friend who has lost someone, it hurts indirectly and you might not know how best to comfort them.
Say this prayer:
Dear God, my friend (person’s name) just lost a loved one. I pray you grant him/her the strength to be strong. Grant him/her the grace to forge ahead and get through the loss. Help them to live through the pain and grant the dead eternal rest, Amen.