If you have to miss someone's funeral, send this condolence letter to the family in your stead.
Dear {Recipient},
I'm so sorry to hear about {Deceased}. {He/she} was the sweetest, most ridiculously funny person I have ever had the pleasure of knowing, and I can't imagine the magnitude of loss you must be feeling.
I wish that I lived closer. If I were there I would hug you for a full day and then bake you four casseroles. I'm sorry that I missed the funeral, but I hear that it was a lovely service full of many of the numerous people who loved {Deceased}.
No matter how far away I am, I am always still here for you. My thoughts and prayers are with you.
Love,
{Sender}