I am selling my home at a loss, but will IRS view some of it as a capital gain because I rented it out for a year during which it acquired some value back?

I bought my home during the real estate bubble in 2006.  The purchase price was $335,000.  It was my primary residence. During the crash it lost more than 50% of it's value within two years.  In 2015 I decided to move to another city, but because my mortgage was still underwater, I could not sell it.  It was worth about $175,000 at that time.  I rented it out for a little over two years, and after that period it was then worth about $240,000. (Then I kept it empty for a 6 months while getting ready to sell it.)  I am now selling the home for $270,000.  This price is $65k less than the purchase price that I bought it for.  But will the IRS say that I have to pay a capital gain (business gain) for the value it acquired back while I used it as a rental?