Depreciation of a house is determiend by depreciation basis / 27.5 years. The depreciation basis is the acquisition cost of the strucutre of your rental house, excluding the land.
So if you bought the house for 600K, you can make an educated guess about how much percentage is the structure. Let's say 275K (for ease of math).
Then your annual depreciation is 10K. This is deducted from your annual rental income. The reduction is operated on your income tax, not capital gain tax. (1)
When you sell the house, the deprecation has to be recaptured. 10K x 2.x years = 2X000. You need to pay income tax rate for the recaptured depreciation, because as said above, your annual depreciation reduced your income tax of prior years, not capital gain tax. Note that 2.X years is used because depreciation, both claiming and recapture, counts num of days in a partial year.
Your home sale is exempted from primary residence capital gain exclusion, but it doesn't not exempt your sale from depreciation recapture.
Capital gain and depreciation recapture are two completely different concept.