You have a lot going on and my initial concern is that you need to be careful not to convert exempt monies into non-exempt which you will lose in a bankruptcy. Second, you really need to consult with a divorce attorney to make sure you properly split the pension plan with a QDRO, or offset with other assets, if any. Otherwise, a distribution from a 401(k) is fully taxable as ordinary income, and there is an additional 10% early distribution if you are under age 59 1/2. Good luck.
The above "answer" is for discussion purposes only and is neither intended as legal advice nor to create an attorney-client relationship. An attorney-client relationship is not created until after an in person consultation and I agree in writing to provide representation. I am licensed solely in the state of Arizona. You should consult with a knowledgeable attorney in your jurisdiction.
You need to work with both a bankruptcy and divorce attorney on this issue. You could easily burn yourself on both the retirement plan side and the home acquisition if you are doing this yourself. That could be far, far more expensive for you than hiring counsel. If you already have counsel then I would suggest you direct these questions to your attorneys.
Sign up to receive a 10-part series of useful information and legal advice about the divorce process.