Note that I am not licensed to practice in your state.
If you get foreclosed on and the value of your home does not cover all 3 mortgages, you are legally going to still owe the outstanding amount. Since you are already 2 months behind, you should try to negotiate a short sale.
A short sale is a procedure whereby you and the bank(s) all agree that whatever you sell the home for is going to satisfy the loan amounts and anything that you owe on top of that, they will not come after you for. Note also that any amount of money that the banks forgive due to the short sale is considered income for that year.
If you file for bankruptcy, that can halt a foreclosure proceeding but your first step here should really be to negotiate a short sale.
bankruptcy will wipe out the debt but destroy your credit in the process. By now, the bank should have already contacted you to discuss options to avoid foreclosure. Although short sale is an option, that's going to be difficult to negoitaite if you have three separate morgages with three separate lenders. Try to negoitaite a short sale if you can. In the meantime, talk to a bankruptcy lawyer now so that you're prepared for the worst. You don't want to do any last minute scrambling. Right now, you still have some time to work with. Use that time wisely.
I would echo the idea that a short sale is ideal, but would be difficult to negotiate with so many lenders involved. Given the current state of the housing market, it's unlikely that there would be money left to negotiate with the second and third lenders. That said, I want to qualify Piotr's suggestion that bankruptcy will "destroy your credit". While a bankruptcy certainly is a negative on your credit report, if you have a home in foreclosure with three mortgages, some or all of which will be unsatisfied after the foreclosure, it seems likely that your credit is in pretty bad shape already, and bankruptcy can provide the opportunity to wipe out a lot of negative items on your credit report and start rebuilding. A local bankruptcy attorney can help you analyze this, when you provide more specific information about your other debts and your credit history.