Don't worry abou tnot changing the subject fast enough - the important thing is that it didn't spiral out of control! You saw what was going on, and changed the interaction by deciding carefully on your response.
As a guy, let me tell you how great it is to just be able to spend time with the person we love, and to just not have the R hanging over our head. We know it's there, and it needs to be dealt with, but it's so great to just get to enjoy your company.
Now I'm speaking as the guy trying to keep the W here, but I think I can relate to how your H feels. He probably carries guilt that you can't imagine is actually there, and you have given him a special gift by just being able to enjoy each other's company.
I agree he should have gotten you something. Perhaps a better way, instead of saying it didn't matter (which it does!), was to say something that he would find reassuring, like "Well, any gift would be fine with me. What's important is that it came from you. I do like black hills gold, and I could use some earrings"
let me tell you, guys love very SPECIFIC ideas for gifts. It's hard enough to try to get it right, and we don't know what we're doing, it feels strange, and having a specific item in mind makes it so much simpler. Sure, you'd like him to know what to do on his own, but he probably needs to experience some success in that area to build some habits, so if you can make it easier for him, I think that shows that you appreciate his efforts. I would find it encouraging.
I can totally relate about the up and down. Sometimes I think things are moving up, but the trend can be hard to see because it's such a wild ride.