Wow sorry to hear about your situation.
If I were you, I'd also consult with 2-3 immigration attorneys while the custody battle is ongoing. Your kids are born here and dependent on you. There may be some sort of solution for you.
I hope it all works out for you! Stay strong my friend <3 Please don't give up.