How do you show compassion when a tragedy happens to someone you don’t know well?

Our prompt comes from a listener:

How to express compassion when someone you know, but not that well, is going through something rough. The instigating situation is the husband of one of my coworkers passed away, and some of my other coworkers seem to be at a loss as to what to do. How much to say, what to say, etc. If you don’t know someone very closely, but you do like and care about them, how do you help them?