BRNR, I'm sorry you had to witness his behavior yesterday...but at least the judge and your lawyer got to see just how far gone he is right now. I'm sure you looked wonderful and deserve the award of the year for being cool, calm and collected.
That's one more item to cross off your list of things that had to be taken care. I realize it's not how you wanted it to play out, but maybe, in time, things will get better for all of you.
I hope today is a better day for you and your children.
Sit quietly, the answers will reveal themselves when you least expect them to. The past is gone, the present is a gift and you need to focus on today, allow the future to reveal itself when it is ready.