Disregarding fish, the last pet I lost was a fourteen year old cat that I adopted knowing he would die. He had heart and lung trauma and was ten when I adopted him. It wasn't that hard to get over it; not only had he died suddenly, but I was also expecting it and I helped him live a warm, comfortable life for the short time he spent with me.
This is one example, the other that goes against it like night and day was the lost of a cat I had with me for twenty-one years. He was old, emaciated, and when you get to year eighteen with a cat you slip into a death waiting period. When is this cat going to kick the bucket? How can he continue walking? When this cat eventually did have two strokes over a period of a week and could no longer use his back legs, I had to take him to the vet to be put down. That is the worst possible way to go about things. It took me a long time of grief and over a year before I finally came to terms with the fact that I would no longer have a cat like him ever again.
If you have this dog put down, I highly recommend you have a vet come to your house to carry it out. That way there is no 'death' car drive period, no large 'I killed him' sensation. The dog will not be terrified and confused before you eventually put him out and will instead be in the company of his house and family. Afterward, please, by all means, cry. Get it out of your system; be human. Collect all old photos of your dog and make a multi-part picture frame out of them then hang it up. Keep in mind that there will be no actual replacement, you will never come across a dog identical to the one you are right now loosing. So only remember and cherish the good memories you had with him as well as the long life you helped him share.
Do not get a new dog until you are through grieving. I cannot stress this enough. If you go to a shelter or pick out a new dog in a state of loss and despair, the future dog will feed off your emotions and become an ever living nightmare by trying to become the most dominant thing in the house. Then you'd have to go through a period of time training the dog to know better, which I'm sure you don't want.