Dear NAME
I am [shocked and] deeply saddened to learn of your great loss, that DECEASED, has passed away. We hope the love you and DECEASED shared will help comfort you in the days ahead. [It was my privilege to have known DECEASED for many years, and [his / her friendly] presence will be sadly missed.]
I would like to express my deepest condolences and sympathies to you and your family. If there is anything I can do for you now or in the near future, please let us know.
Sincerely yours,
........................................