I'm.....erm...genuinely sorry to hear that.

I lost my cat of 15 years about 6 months ago. She was emaciated and unable to eat or absorb any fluids no matter how much she drank. Like him, she was still very friendly, but still listless. And clearly in pain. After we found out her hormonal system had shut down, causing her kidneys to fail, we ended up putting her to sleep. It was particularly hard to deal with.

I don't know if you're considering it or not, but I recommend not letting the condition persist much longer. The more dehydrated he becomes, the more miserable and detached he'll be.