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

I had to have my bestest buddy Stubby put down in 2015. Hardest thing I've ever done, including removing the oxygen mask from Mama after she died in 1984. Here's something that's helped me after the fact and I still do on occasion. I did it tonight, in fact, when Kitty and I sat in the yard swing like we do every nit it's not hot as the devil's balls. As I was sitting down, I patted the swing seat and said "come on, Stubby, here's your spot." He would always come plodding over and jump up next to me, whether in the swing, on the porch, in the house....wherever. He's still there. I know he is.