I had two wonderful cats pass away not long ago. One (Percy) died of pancreatic cancer; I had fed him through a transdermal tube for the last three weeks of his life. The other was a barn kitten I adopted after his death who ended up having feline leukemia. Her last week was spent in the vet hospital on an IV, but her lungs filled up, poor thing. She was barely a year old
So I definitely understand about trying to nurse a very ill cat/kitten and not having a happy ending. I does make you feel low. Here's a creature whose life is so much shorter than ours anyway, and they brin joy and a sense of "doing something right" to us. To have it end in death is sad and even traumatic.
You said the right thing to your friend, in my opinion. Remind her that along with the loss and sadness, she can have some joy because she *did* rescue the little lost thing and gave him love, a comfortable home, and emotional and medical attention. These are wonderful, caring things that the little sweetie would not have had without her, so she offered him something good in his rough little life.
I understand your sadness too, for her and for yourself. Hang in there, and be glad that you're involved also, because it's one more - rare - opportunity to care and be unconditionally loved back in this life. That's precious gift that companion animals give to those of us lucky enough to be in their lives.
Love and hugs to you and your friend,