When I got Sonia, a cat with hyperthyroidism and kidney problems, I was a little worried that it would be upsetting when she died. It was, of course, but it was also very rewarding. The vet expected her to live for a week or two, but she lasted almost a year.
It probably isn't very scientific, but I'm convinced that what helped her most was feeling wanted. The medicines were vital of course, but wouldn't, I think, have worked if she'd been kept at a rescue. (However good they are, rescues are limited in the time they can spend on one cat.)
Sonia didn't like taking pills, but I found a way to sneak them into her. She was a bit picky with her food, but there were some things she would wolf down. Cheese, butter, ice cream, all had pills hidden in them at some point. If she got bored with one, I'd move on to the next. My newest arrival, Lily, loves yoghurt, so if I need to give her pills I know what to try first!