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

A good vet will sedate first, sometimes with a lower dosage of the same drug.

Having you there so that the last things they see, feel, and hear are you is IMO "the right way".

I could not shoot a pet (unless that was the absolute last possible alternative, like If we were out in the wild with no time and no civilization) because the last thing that they would experience would be me scaring and/or hurting them.
I agree wholeheartedly I've heard too many stories of animals getting put on that cold piece of Steel slab in the vet's office looking around for their family / owner. I also had a personal friend of mine put a dog in a hole. The cancer was so bad, it was ugly. took three rounds point-blank with a 9 mm. I guess he couldn't shoot worth a ****. After the first two rounds that dog looked up at him like what the **** are you doing why are you doing this daddy. That was the story as he reiterated it to me.