In fact, the whole act of having a dog live with us in our houses, to keep us company is selfish. A wonderful book I read on the subject is 'The Culture Clash' by Jean Donaldson. We expect dogs to come into our houses and live with us as humans live. We give them human names, even sometimes dress them up in clothing (oh how I hate that!).
So, letting go of a beloved pet is a real bereavement. A big hole in our lives, an empty space, no one to lick the plates clean! So in their best interest, when the time comes, we must let go. With dignity, at peace and just one day too soon, and never, ever... one day too late.