It depends. If you are current on your mortgage and all of your other bills a short sale is probably the better option. It will drop your FICO (credit score) score 85- 160 points. You may be able to purchase a new home fairly soon after the sale – BUT it may be difficult to find a lender willing to give you a mortgage.
If you are already behind on your mortgage or behind on your other bills your FICO score has already dropped. Late payments have the biggest affect on your credit score.
30 days late: 40 to 110 points
90 days late: 70 to 135 points
Foreclosure, short sale or deed-in-lieu: 85 to 160
Bankruptcy: 130 to 240
if you cannot maintain the payments on your bills Foreclosure can take four months to over a year to complete. During this time you may be able to remain in the home until the completion of the foreclosure meaning you are not paying a mortgage payment or rent.
In either situation you will not want to pay the difference between what you owe and what the value of the home is. (deficiency) There are possible tax consequences for the deficiency in a short sale that are not an issue in a combination foreclosure/bankruptcy.
If you are behind on your bills and your mortgage a bankruptcy can clean up the outstanding debt and delay a foreclosure. In this situation it is significantly more beneficial to the homeowner to let the home go in a foreclosure with a bankruptcy filed in a timely fashion.