sold rental property that was my home for 20 years before renting it out

I owned and lived in my old house for 20 years. During that time, $40,000 of major renovations and improvements were done on it (I kept the receipts). The purchase price of the house was about that amount back when I bought it on a contract sale and paid it off after a few years. I took a job out of state, rented the house out from 2012- 2022, and used turbo tax, which calculated depreciations each year automatically. All repairs/ improvements during the time it was rented were expensed. This year, the renter moved out in May, 2022 and I decided to sell. Some modest upgrades were done after the move out and the house sold in the fall. The capital gains are substantial, housing inflation being what it is after more than 30 years.

I understand that this year's expenditures on the property will either be expensed during the rental period or be listed as improvements prior to the sale, but I am lost as to how to account for what was put into the house  when I lived in it and it didnt factor into my taxes, aside from property tax paid on my home. How do I list the work and materials from before I even considered renting the house out?  What percentage of business use do I put in for the 4.5 months the house was rented?

I had to fill out a capital gains form for the title company for state witholding and it included  the amount for all of the improvements on the property. I see nothing like that in turbo tax. I had very little income last year, but the 10 years of depreciations on the house that turbo tax deducted from rental income reporting aren't helping me now! Any advice where I should begin (aside from hiring a tax accountant to sort the whole mess out)?  Thanks in advance!