You need to file an amended return for 2016 and 2017 and claim the depreciation. Once you have done that, you will be ready to file your 2018 tax return. When you sell the property, you will be subject to depreciation recapture tax for the amount of depreciation you were "eligible to take", not the amount you took. So, you could get a refund for prior years and save money on future tax. See the following FAQ for information on amending prior year returns:
https://ttlc.intuit.com/replies/3288565