Been there, done that.
I have the "she played the order of protection card" purple heart, and the $80,000 custody bill to prove it.
IF and ONLY IF she has a serious problem (mental health, alcohol, gambling, abuse) AND you can prove it THEN you might come out OK.
You keep you nose spotlessly clean.
You don't argue with her, write to her, NOTHING NEVER no matter what
You beg, plead, borrow money, whatever to get the best damned lawyer you can
You have a new full time job! It's called investigator and recorder! You search the house for every bill, receipt, letter, scrap of evidence you can that shows she is unfit to be a mother. You make a list of bars, casinos, etc she goes to. You keep a record- to the minute- of when the kids are with you and when she dumps them with a babysitter.
WARNING: You are a guy. You screw up one time and you're done. Got it?
Whether there are drugs or alcohol involved I suggest you immediately start attending Al-anon meetings so you learn how to deal with the blows that are coming, so you learn to keep cool, and respond not retaliate. It's something everybody should do anyway.
I say again: you screw up one time and you're done. Defend against her striking you? Go to jail. Scream at her? go to jail. Send offensive email? same. Get the picture?