When i took him he was almost a 15 y.o. cat... severely malnourished, abused, thrown out of the house and left to die, desperate, scared and aggressive. With no hurry, I gave him unconditional love because I wanted his last years to be happy, and they were. For almost 3 years he felt loved and safe, and after less then one month in my house he reciprocated by loving me and giving me total trust. So yes... I'm sad but I'm also glad, because I know he had his happy ending.
Honestly, as long as the cat has some moments of peace and happiness, then you have done well. Losing them is hard, our job as pet-friends is to try to fill their lives with love and happiness.