If you want to comfort a friend then you should write a note of condolence.