A short sale is tempting, especially when a broker is telling you that you will owe nothing, your credit will be better, and you can purchase another home faster if you short sale.
Owing nothing means you have forgiven debt and the IRS considers forgiven debt to be income. Your credit is negatively affected in both scenarios and any difference is generally slight; having a foreclosure on your credit report is currently being viewed no differently by mortgage underwriters than a short sale; and your financial gain is in possibly owing less than you would if you let the house go to foreclosure, which is irrelevant if you are filing bankruptcy.
Also, if you short sale you are cutting short your ability to live rent free through the foreclosure process for 6 to 12 months. A strategically timed bankruptcy will extend your time to live in the house rent free. During all of this time you may be able to save thousands of dollars you would be paying in rent in order to stabilize your financial life, aggregate a down payment, plan your move, and buy necessities.
In many circumstances you may benefit more by living rent free and extending foreclosure out as long as possible. Both short sales and foreclosures are easily spotted on your credit report. The differences between a short sale and a foreclosure are currently viewed as non-existent in purchasing a future home. There are other perils to short sales depending upon the terms of the contract that is negotiated. These range from possible fraud if you agree to make payment on some of the debt and never do, to later litigation to collect the debt, and other contract issues that may arise. You should weigh all the factors and make the decision you believe will be best for you.
Many people may have a financial interest in your actions. A broker stands to make thousands of dollars in commissions off a short sale and may desire to pursue this avenue even if your best interest is to live rent free until foreclosure. Choose the option you believe is best for your situation. Here's a fantastic chart by my friend Jim Spray (mortgage broker and expert witness) showing the underwriting differences between a short sale versus a bankruptcy: