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

We don't have a dog anymore. We had a Samoyed, Mandy, that we had to put down. Had her from a pup. One of the coolest dogs ever. Did everything and went everywhere together. She had kidney failure and there was nothing to do. We held her as they gave her an injection and bawled like babies. Still hard to think of it. I'm not going through that again. Good luck whatever you decide. It won't be easy.