I think you handled it well.
To me, your response was of you attending to your own feelings, rather than trying to fix something you can't (him).
There are a lot of people treading water in place until they can get their bearings, and figure out what comes next in life. I'm one of them. As long as you're working on yourself and moving yourself forward, the rest of your circumstance is less important for the moment.
These are rocky waters, and setbacks are normal and will happen again and again. Each time it gets a little easier.