Two steps forward, one step back... you are making great progress and some great responses from him! So you think that him seeing you at the gym having a nice time with the trainer pushed him away? How did you greet him when he came to the gym? Might sound crazy but maybe next time stop your training for a minute as soon as you see him to focus on him and go over to give him a nice smile and greeting? Then go back to training (unless H tries to engage you in a little converstation of course.)
I am beginning to see that sometimes the littlest things can have huge effects with my husband. Yesterday when he got home from an outing with the kids, I did something I haven't done in a long time and actually came out of the house to greet him and help get the kids out of the car. We ended up having a very nice evening where he even watched a movie with me on the same couch after the kids went to bed - no computer! (That is a HUGE thing for us.)
Maybe the greeting we give them when they get home sets the tone for the whole evening?