You handled that well, I think. Kept healthy boundaries, gave him good advice.
Just keep moving forward with your life. If he has it in him to pull himself back together, dump the girlfriend and do what he would need to do to win you back, he can catch up with you whether or not you’re divorced. Odds are he’s not capable of that kind of change but stranger things have happened. Don’t let it slow you down though. Him trying to make out with you and feeling a little weepy is NOT the same as him making an honest effort to make amends.