Commenter Downfall notes:
It is also worth noting that your 401(k) is protected in bankruptcy proceedings. So, to the extent you're considering a 401(k) loan to pay off debt, it often simply makes more sense to declare chapter 7 or 13. Depending on what you own, most of your assets may be shielded by various exemptions. Don't do anything rash without consulting a bankruptcy lawyer.
In general, the point at which you're kiting debt--using home equity or the 401(k) to pay off credit cards or bad car loans--is the point at which you are in serious financial trouble. While transforming the debt to lower-interest rate forms can seem like salvation, it's not the answer. For one thing, the lower interest rates come with greater risk--of losing the house or your retirement savings, rather than your credit rating. For another, it won't work unless you get serious about controlling your money. I've watched colleagues do it (not at the Atlantic), and invariably after they refinanced the house, the credit card debt started to creep up again. Many financial counselors and personal finance gurus say the same thing.
Bankruptcy may be the only answer. But even before you contact a bankruptcy attorney, you need to sit down and get serious about your money. Get out your bank statements and look at all your expenses, including the cash withdrawals. Look at your fixed costs, and see how much that leaves you for variable expenses like food. You may simply be overspending on crap, in which case I am a big fan of the cash budget, and have been since my early days as a broke young journalist with monstrous student loan payments. Cash provides automatic discipline; it's hard to rationalize overspending when you can see just how little is left for the rest of the month.