Sorry to hear that, Brother.
Wrap your brain around the concept that she will get half of everything you ever earned while you were together. If you're able to come out better, then it's all gravy.
Do everything you can to remain civil and professional with her. Never let your kids hear you say anything bad about her. Ever. Not once. As strange as this sounds, moving forward your relationship with her, and it's failure are none of their business. No matter how badly she may behave, she's their Mom. If you can sit down at the kitchen table with her and put it all on a legal pad, you'll save yourself a lot of angst and attorney fees. If you can "give in" to certain things she wants in order to facilitate a quick agreement in return for certain things you want, it's worth every penny. People will give you advice like:
"Roll in on that cunt and fight her tooth and nail!"
Ask those people to compare what they think they "won" in court financially to what it cost to litigate it. It isn't worth it.
Moving forward, your relationship with her is going to be jointly parenting your kids. That relationship will be healthier for the kids if the two of you can agree to act like adults ad settle as amicably and quickly as possible.
Now;
You.
You're a pro. Compartmentalize like a MF and work your way through indoc and IOE. When you get a chance, take some time for yourself. Nonrev to Hawaii and put it all out of your mind for a few days. Exercise is your friend - the more the better. At some point in all of this process, you'll have come far enough and gotten past the anger enough to look at what happened a little more objectively. When that happens, the single most important thing you can do is forgive her and yourself for what happened. Let it fucking go.
You're also about to re-learn who your real friends are. Lean on those folks. Bigtime.
Don't medicate with booze or food.
That's it. The day you have to tell your children is the worst day of your life. Everyday after that will be just a little bit better.
Good luck, chum. Those of us who've been through this are rooting for you. Hell, you can at least call yourself a real airline pilot now!