What DO you say when you encounter someone who has recently sustained a tremendous loss in the form of the death of a child? Joan Calvin comments below that as a pastor, even she doesn't know. Please allow me to simplify.
First, remind yourself that you are looking at someone who has experienced one of the worst things life has to dish out. One of the very worst, and you have no way of knowing what that means unless you are part of this particular club. You are speaking to someone who may have sat for weeks on end at the bedside of a dying teenager, or may have witnessed or even in some way been involved in a young child's completely accidental death. He may have received the phone call at work, standing at lunchtime amid a sea of empty cubicles. She may have found her child's body. Whatever the situation, it's terrible. And you just need to know that; you don't have to say it.
Second, and I am going to switch to the feminine pronoun here, because I am the writer and I am female: walk right up to her, RIGHT UP TO HER ~ THIS IS NO TIME FOR COWARDLY PUSSYFOOTING AROUND ~ and say and acknowledge whatever is appropriate to your knowledge and the time span, anywhere from "I just heard about your son's death and I am so terribly sorry" to "I am so glad to see you; you are never far from my thoughts."
Third, if you can because you know something, offer a kind and specific remark or memory about her child. "I will never forget his speed on the soccer field." "I hadn't seen her since she was in kindergarten, but I heard she was really enjoying her job." And then pause. Give her time to respond. You are contributing to a mother's narrative of her child's life by reminding her that others remember, and want to remember. You are doing one of the very best things you could possibly do. Better than a lifetime's delivery of chicken soup.
And finally, ask something specific about how she is doing. One of my best friends tells me that the best advice I gave her came from a story I related, either here on on my other blog, about running into a friend at Borders and his asking me how I was that morning. As I recall, I was in bad shape due to an earlier telephone call, and could not have offered any rationale whatsoever for my presence in a bookstore. "How is your morning/afternoon/evening going?" will do just fine. It sounds as if you really care, and it limits the answer to a manageable parameter.
And yes, you should try your best to interject yourself into someone's life. Call and then stop by, stop by for five minutes on your way to somewhere else, email and make a specific suggestion for a meeting time and place. Risk the rejection that you may well experience, perhaps even several times over, and realize that you are dealing with someone who on some days finds that it takes too much energy to hit "Reply."
So: this is not a situation which requires imagination or creativity. This is a situation which requires courage and fortitude. And if you think that you are somehow lacking in either of those qualities, take a cue from the mother you are approaching. She needs them just to open her eyes in the morning.