You're doing the right thing. I remember our family dog Lucky, who was over 20 by the time he was put to sleep. I wouldn't just leave him. My daughter and I (she was only 10 at the time, but Lucky became her dog and she adamantly refused to let him go without her) carried him in to the Vet's, and held him on spread out across both our laps while they injected him.
We cried, but we also knew it was the kindest, most loving thing we could do for him. He was in pain, hurting, no quality of life, and we'd both agreed that when he got to that point, we'd help him on his way.
You're doing a good thing....a very hard thing, but a good thing, the best thing you can do under the circumstances.