not being funny, but don't try and find something to say that will make them feel better, cos there isn't anything really. Maybe just let them know that you're thinking of them, and if there's anything they need, that you're there for them.
From experience, what freaked me out when I lost my mum was that people talking to me split into 2 groups; the ones who had lost someone really close, and were comfortable talking to me, and the ones who hadn't, who either avoided me, or mumbled "sorry about your ma..." The thing that messed me up for a while was realising I'd moved from one group to the other. Does that even make any sense?