I usually say what's in my heart at the time. At my grandmothers funeral, I hugged her sister, my great aunt and said "I miss her so much, she was everything to me." To the husband of one of my best church friends, I said, " I'm praying for you" . I never say "I'm sorry" or any of the other trite common phrases. Because when my Step-Dad (I was very close to him) died and people said that to me, it really felt like just something that they felt they had to say. It meant more when they said something about how they really felt about the person. I didn't make me feel better. Worse is "he's in a better place" or "it's for the best". I don't know why people say things like that to the grieving. It just comes off as so callous and unfeeling. I say, if you can't say something from your heart, just hug the person and say nothing. But, realize, as I do, that people don't know what to say. It's an uncomfortable situation and all anyone really wants to do, even if they're not especially good at is, is let each other know that they share your feelings and understand. So, that's what you should say. IMO anyway. Whatever's in your heart, or nothing. Just be sincere. And don't feel pressured to talk if you don't feel like talking. All the rules of society kind of go out the window at times like these.
Have you grieved for someone in the last year? (and yes, includes pets)