Wish them a happy birthday and remind them that they can talk to you about their loss and their pain, but do not try to comfort them. They need to know you haven't forgotten their birthday, yet that you're not expecting them to be joyful on that day.
There's a novel I recently read where a man lost his wife while she was giving birth to his first child. His daughter's birthday would always be the day he lost his beloved spouse and therefore, he would never totally enjoy his daughter's special day.
Grieving may change the signification and atmosphere of some special days like Father's Day or a birthday for people who lost someone. What you need to know is that although the temptation to comfort them is strong, you should not try to do it. It has been proven that the most effective thing one can do to help someone who's going through difficult times is only to acknowledge their pain. If you try to comfort them, it could sound like it's either not a big deal ("these things happen") or that it shouldn't hurt ("you'll get through this"). For instance, this is why saying to someone whose marriage came to an end
You're a good person. You'll easily find a new partner.
would not necessarily help them. They need to go through the sadness process. By comforting them, you deprive them of one precious thing that is that they know you know. You know what they're going through. Comforting them might make them feel that you don't understand what they're going through and how bad they're hurt. Letting them tell you their story is the first step toward acceptance and healing. I know it's difficult because we hate seeing our relatives suffer and we'd like to do anything we can to help them, but this is the most effective way to help.
Considering this, you could say to your friend:
Bob, I know these last days must have been incredibly hard. I'd still like to wish you a happy birthday. I can't imagine what you're going through right now. I'm here if you want to talk about it.
Wishing them a happy birthday makes them know you remembered and care about them, yet with the other sentences, you let them know that you understand their pain. When this latter alleviates, they may be able to celebrate again, but right now, all they need is that you don't forget them and express your caring through these tough times.