Jim, I feel your pain and sorrow.
I've had to do the same twice with Pekes. Both were plagued with cancer, one at age 13 and one at age 15.
It is hard especially because you get to decide the day the dog is put down. You have to decide when the dog's suffering is to large a price to continue to live another day. It's one of those difficult responsibilities we have as pet owners.
Think of the dog as being grateful for the ending of pain.