Do NOT do it. If one declares bankruptcy, your 401k is protected.
If you touch the 401k to save a home or pay credit cards, and you fall behind again or fail to get through the mess, then you lost that money you took out of the 401k and then have to declare bankruptcy, you lost even bigger time.
On top of what formersandiegan says about the penalties and taxes you have to pay if you are under 59.5yo. Bad all around idea!