I am sorry you are going through this. Open a new checking account. Put your earnings in that account. Close the joint account. You could borrow against your 401K, but consider that carefully. See an attorney. Do you have a separation agreement? If not, get your attorney to draw one up. Ask her to sign it. Be polite. Be ruthless. If she is seeing someone else it might be a good time to get her to sign one. She may be “wanting to move on” and all that. That will change once the wolf starts to bite.
Bankruptcy is a problem. Have you seen the new bankruptcy rules? You will have to do 6 months of credit counseling before you file. You will have to hire an attorney to even file for bankruptcy. Those attorneys only take cash. Talk to your creditors. See if you can negotiate something.