There is no way to know how much longer he would have lived. What you need to ask yourself is, would that time have been enjoyable for him? When the answer is "no", then keeping the animal alive is something that the human is doing for themself, not the animal.
I think you can rest easy, you did the kindest thing.