When our last cat, who was a week shy of 21 years old when she died, left us after having been there with us for all but her first 5 weeks of life, it was like having part of my heart ripped out. There was no way she was going to recover from her final illness. I was fortunate in that I had a sympathetic vet, and was able to stay home with the kitty over a period of a few days until she slipped away in her sleep, having had no pain for those last days thanks to the liberal application of the narcotics. So many people tried to say "the right thing" when they heard she'd gone, but there is no right thing to say, really. It hurts, you grieve, in time, you remember them fondly and the pain is less. I still miss her. I still miss my first cat, who died in the 1970s... They are such a special part of our lives - they are family.
Like the people who wanted to comfort me, I really wish there was something I could write that would ease the pain of this for you. But the best I can do is offer a virtual hug. I'm so sorry your friend has to go.