If you own investment property, what happens to it primarily depends on whether you file for Chapter 7 or Chapter 13 bankruptcy.
Since filing for Chapter 7 bankruptcy means that you only have enough money to live on, if you own investment property and are not making a profit on it, it is usually advisable to give it up (and you will not owe anything on it). There are no exemptions for investment property, just your personal residence, so if there is equity, you are more likely to have to surrender it to pay your debts.
If you file for Chapter 13 bankruptcy, you do not necessarily have to give up your investment property, but if you are not making a profit on it, it is usually advisable to give it up. Since you will essentially be reorganizing your finances to pay off your debts over a three to five year period, it will not have to be liquidated in order to pay off your creditors, but you may have to pay more to keep it. If you have a large amount of equity in your investment property, this will result in an increase in the Chapter 13 payments.
Another option if you file for Chapter 13 bankruptcy is a mortgage cramdown, which is only applicable to property that is not your residence. The purpose of a cramdown is to reduce the amount that you owe on a secured loan, to the replacement value of the property. This option is risky as you will be obligated to pay back the entire sum of the new loan during the period of your repayment plan.