Investors & landlords

You account for the depreciation while it was available for rent, vacant or not.  You should have been reporting the rental income, expenses and depreciation on a Schedule E with your tax return for each year it was rented or available for rent.