Be there - as in be available. To talk, to listen. To hold and cry.
Obviously avoid the trite and just plain dumb cliche's: "S/he's in a better place", "Time heals all wounds". "It's a sad part of the whole cycle"...
Blah blah. You can express those thoughts. But MEAN them - and say what's in your heart and WHEN your heart tells you it's right (or the grieving person outright asks). You can surely express some comforting thoughts - just say it from the heart and not from the inside of a fortune cookie or a 50-year old "etiquette" book or some vague recollection of things to say to FILL THE SPACE.
If that is your motive - to ease YOUR discomfort - please try and let the space just BE. Bettter that than for a grieving person to hear what you both know is an insincere - or at least a cookie-cutter version of - some obligatory expression of condolances.
Be there when s/he wants to grieve. Be there when s/he wants to (of his/her own initiative) "get out" for awhile and just do something not related to funerals and final arrangements and missing someone and what not. That stuff is important - but it's not the only thing someone who has suffered a loss needs.
Let them know that you're there to help them remember, to console them, and yes, to help and join them in getting back into living (as slowly as they want!).
Whatever you do - be SINCERE!