When writing a sympathy card to someone when someone has died you can write things such as
"My Thoughts and Prayers are with you and your family" or I'm sorry for your loss and I'm thinking of you and wishing you hope in the midst of sorrow and comfort in the midst of pain.
Or here's another example of something to write in a sympathy card.
With deepest sympathy as you remember "Name Of Person Who Died."” “I'm saddened to hear that "name of person who passed away" has passed away you and your family are in my thoughts and prayers.