Most people just don't know what to do around death.
Dealing with death is difficult. You want to help, but don't know what to do. Many people feel very uncomfortable when someone they know has a close friend or relative die. It is hard to know what to do or say. You don't want to make things worse by bringing it up, and at the same time you don't want them to think you're insensitive. The trouble is that no one ever tells you how to deal with it. It's something that we just don't talk about.
The first thing to realise is that the person involved already knows. You cannot make it worse by mentioning it. You cannot help them without acknowledging their loss. What you need to do, in every case, is to let the person know that you share their loss. Empathy, not sympathy.
Let them know you care
It can be very tempting to just pretend that it didn't happen. To just not talk to the person. This is the worst thing that you can do. What the grieving person needs is for lots of people to reach out to them. You don't have to be highly skilled are particularly empathetic. You just need to let them know that the person they lost was also important to other people.
The best thing you can do is to listen. Let them talk, and just listen. Do not offer advice. Don't tell them "it will pass". Do not tell them stories about how it also happened to you. Really listen. Hear their grief and acknowledge it. Many people are too busy thinking about what they are going to say in return to really hear what's being said. Talk about your memories of the dead person, share what you have in common. And don't sanitize the dead person. Talk about their faults as well as their virtues. Let the listener know they were a real person in your life.
Do something practical
It is always better to do something than to do nothing. The second best thing you can do is to help the person in practical ways. If they are not coping well, offer to cook a meal. Or to look after the kids for a night. Ask if you can do the ironing. Maybe suggest you go out for a walk at the weekend. Show the person you care by doing something useful for them.
The third thing to do is to be there for them. Even if you feel deeply embarrassed, do not just disappear. How are you going to rebuild a friendship, if you just dropped out of sight the moment they really needed some help? Call the person, visit the person, let them know that you are there if they want to call you day or night. Let them know that you are a resource, a friend.
Invest in a long-term friendship
And be a continuing friend. If you know they're still grieving long after the event, then don't be afraid to reach out on the anniversary. Being person may feel very down at that point, and your offer of friendship and company can make a difference.
But whatever you do, just be there for them.