The IRS has strict rules in place to prevent you from offsetting the capital losses against your rental income profits.
The capital losses are called Portfolio losses and Net profit from your rental Income activities are defined as Passive gains. The portfolio gains/losses are not allowed be offset against passive gains/losses.
Hence, you are out of luck on this one! Sorry, you would not be able to offset the gains from your passive activity with losses from your portfolio losses.