I'm glad you had a cat you loved, cherish those memories. My old cat was wild bro. Some family gave him to us in a cardboard box. Damn, I remember when I was a kid and I was playing in the living room with legos.. unfortunately I was only wearing shorts, no shirt. Next thing I know, my cat pulled up and we had a stare down as if some crazy boss fight was about to take place. Out of nowhere he leaped towards me and put his claws into my nipples, I screamed. And ever since that day.. I've been living in fear, never would I ever be caught lacking again. Me and this old cat had beef for the rest of time.
Anyways, enough joking around homie, I'm sorry you've gotta go through this. When a family member dies or when a pet dies, sometimes people say, "God works in mysterious ways" but that's just a dumb thing to say. The thing is, these things happen and it genuinely sucks. If the cat is 100% certain to pass away soon, you've gotta let it happen and allow him to be put out of his pain. Pretty soon he will be at peace. Your cat may pass on, but he will live on in your heart and memories.
And as for you, stick around, pain goes away eventually. We'll be here if you ever wanna talk, much love :-)