It sounds like you did the right thing for him, hard as it was :(. He was lucky to spend his life with you.
I’m so very sorry for your loss.
So sorry for your loss. There is never a good time for the owners of an old dog, just the right thing for the dog.