The IRS says:
When you change property you held for personal use to rental use (for example,
you rent your former home), the basis for depreciation will be the lesser of
fair market value or adjusted basis on the date of conversion.
Fair market value. This is the price at which the property would change hands between a willing buyer and a willing seller, neither having to buy or sell, and both having reasonable knowledge of all the relevant facts. Sales of similar property, on or about the same date, may be helpful in figuring the fair market value of the property.
Figuring the basis. The basis for depreciation is the lesser of:
The fair market value of the property on the date you changed it to rental use, or
Your adjusted basis on the date of the change—that is, your original cost or other basis of the property, plus the cost of permanent additions or improvements since you acquired it, minus deductions for any casualty or theft losses claimed on earlier years' income tax returns and other decreases to basis. For other increases and decreases to basis, see Adjusted Basis in chapter 2.
So my guess is that your $40,000 is what you have to use.
I am not an accountant. You should seek professional advice to clarify what the IRS means.