Writing a Condolence Note "My condolences to you and your family."
"My sympathy to you."
"It was a pleasure knowing (name of deceased)."
"(name of deceased) was an amazing person"
"He/She will be deeply missed."
“I am so sorry for your loss.”
If you see the family at a time afterwards, take your cues from them. Depending on your relationship with the individual you could say any one of the following:
“Tell me how I can help?”
“How have you been managing since (name of deceased) died?
“What do you need right now?”
“It's ok if you do not feel like talking right now.” A well structured condolence or sympathy letter usually has 7 parts.