How do you deal with an 'on the way out' pet?

That's what friends are for.

Don't put it off till the animal is suffering in the middle of the night. My mother had that happen with her dog. Went into suffering. Only option was to have a family member take it out and do it.
Or wait.

There is something else you could do. But I would get flamed. Not that it's inhumane.
Just not a popular thing.

Many years ago a young coworker and his wife took in a stray solid white kitten. It got rabies or something so another coworker loaned him a 25 caliber pistol. He comes in the next morning and said, "I wont ever do that again! I dug a hole in the yard, put the cat in the hole and fired a shot. The cat jumped out of the hole and looked right at me. I panicked, fired again cat fell back in the hole and twitched till it died. I guess I'm not a good shot. I got it burred, drank a couple of beers, then had a nightmare about it". The guy that loaned him the gun said something like, "We see cowboys on TV stand over a horse and shot it in the head. That's a much bigger head, hard to miss." The shooter said, "That spot in the yard is going to mess with me". Sure enough, as days went by, from time to time out of nowhere he would up and say, "Dreamed about that damn cat again last night." I didn't stay at the job much longer and didn't stay in contact with those guys. A few years later I heard through the grape vine that the boy died of alcohol poisoning shortly after his wife left him. In his 20s too.
This story I why I mentioned "sanity" in my earlier post.