Your story is similar to mine as well. I was gifted my pup when he was already in his golden years, at 10 years old. We had five great years of friendship together. The last few months were the hardest. He suffered a large infection in his teeth and had 10 of them extracted. After that, he seemed to be faring well. Eating more comfortably, sleeping better, he had more energy. Then one night I noticed he was breathing somewhat harshly. I chalked it up to the heat. A week later I noticed him trying to rest and coughing himself awake. I took him to the vet next morning. They observed him and ran some x rays, to find he had a partially collapsed trachea and an enlarged heart. They didn't see any signs of heart failure, and they gave him some meds to help him breathe comfortably and to alleviate a possible infection in his trachea from coughing so much. He seemed okay-ish, and a week later we had the follow up. Dr. observed him for the day and ran blood work, everything seemed fine. Two days later, he woke up unable to breathe, he struggled so hard in the oxygen tank, it didn't matter how much they upped it, he couldn't do it, suddenly he was developing fluid in his lungs. The vet told me they couldn't wean him off the oxygen at all, he wouldn't survive it, and he was slowly drowning.
It was the most painful decision I ever had to make. I knew I had no choice, he'd die miserably if I didn't alleviate his struggle. I spent the last moments thanking him and telling him how much I loved him. I wanted more time, the vet said I could take as long as I wanted, but he started coughing up fluid, and wagged his tail weakly. I had to call it then.
Its been nearly two months and here I am, still crying. Some days I get on just fine, others are like today, but I think of him every day.