Oh, Dave -- SO sorry for your loss. I, too, have walked in your shoes and had to make that heart-breaking decision. You are in good company here as so many others know exactly what you're saying.
But, we have to do what's best for them, not for us. I'm sure your little Cody is meeting so many other Yorkies like my Scruffy, whom I lost at 11.5 nearly a decade ago. Also like you, I was as tortured by the emptiness of the house as I was by the experience that made it that way. I swore I would never get another dog.
But a week later, there I was "looking" at puppies. I came home with the bestest buddy in the whole world.

(Ozzie was just 10 last month.) Time will help to ease the pain, but it's the love of another that will help heal the hole in your heart.
Thoughts and prayers are with you.