No reason to beat yourself up over a situation, by all accounts, you performed perfectly in. The thugs made a choice to commit a crime and attempt robbery/assault. You made a choice to defend yourself. The thugs may make the same choice against another person in the future, and that person will have made a choice to defend themselves or not. Those decisions are unrelated to you.
The thing that intrigues me most about this event is about how your sidearm seemed to automatically be in your hand. If I may ask, have you had any formal training or what type of training at all of you done in drawing and presenting your weapon?
A suggestion to help clear your head: if you have any vacation time built up perhaps a few days off out of town will help. Just a change of scenery sometimes helps "reset" the mind.
Lastly... by now hundreds - if not thousands - of people have read your post in this forum and elsewhere. Many have indicated they have re-considered their previous decision to only sometimes carry and will now carry more often or even always carry. No doubt at some point in the future this will save a life, perhaps more than one, due to a self-defense weapon being available where previously it may not have. The event which occurred in your life as horrible as it was, your response to it, and your subsequent post will save someone's life someday.