I, on the other hand, had no idea what to do.
I wanted to express my support, but I also wanted to give the impression that I was willing to actively do something about my friend's loss. I wanted to say something along the lines of, "My prayers are with you and your family," but that would have felt disingenuous. I know he's aware that I'm no longer a faithful Mormon, but I don't know how much he knows about what exactly I believe these days (other than not-Mormonism). I didn't want to offer him something that he knew I regarded as hollow and pointless.
I also considered writing, "My thoughts are with you and your family," as a few others had done, but while prayer at least claims to accomplish something, simply thinking happy thoughts in my friend's direction would obviously be fruitless.
So I settled for something like, "I'm so sorry for your loss. My best wishes to you and your family." Which seems so toothless and dispassionate. And not a whole lot better than my second option.
I realized that this was something that would have been so much easier as a Mormon. I kind of miss the surety of prayer, its purported power, and its capacity to comfort the inconsolable. I don't miss it for myself. I miss it for other people. I don't feel that I need prayer in my life, but I know there are people around me who do want it in theirs. Without my former belief in it, the best I can come up with when someone loses a loved one is basically, "Well, gee whiz, buddy, I'm really sorry." I've always been bad at this kind of thing. But now that I'm agnostic instead of Mormon, I'm pretty terrible at it.
Luckily (at least for me), this friend stopped by to visit me a few weeks later and I got a second chance to convey my condolences. It felt much easier to be genuine in person. Religion and prayer never came up, but I asked how his sister and his mother were doing, and I got to let him talk for a few minutes about how he's doing.
It was a strange experience, though. It was certainly not one of the difficulties I'd anticipated when I abandoned my faith.