You're not stupid. You just gave the relationship another go and found out it's not to be. If you hadn't given it a go you'd probably have invested lots of energy into wondering what might have been.
I think perhaps the way to make this okay is to accept what happened, and NOT spend lots of energy forming resentments against him, or against yourself.
That energy can be so much better used in having fun with your kids; helping out a friend; going for a run; doing some gardening - pretty much anything rather than being anxious or resentful about something that can't be changed.
Take care - give yourself a hug and think what a lucky escape you had. xxx