Oh, I'm sorry you had such a bad night, but it reinforced what you have been learning, right? You understand now that it is better to be detached from the madness--for both of you, but especially for you.
Learning NOT to react really does take practice sometimes. Don't be so hard on yourself. You did take a step on that journey by recognizing exactly what happened!