Repair expenses for a rental converted to personal use

I purchased a house with a tenant in it, whose lease I had to assume. I rented the unit to the tenant for six weeks. The tenant moved out and left the unit in poor condition. I spent the next six weeks repairing it (deep cleaning, patching, sanding, painting, refinishing the floors). Then I moved in, and it became my primary residence.

 

What, if any, repair expenses can I deduct? All of the expenses were incurred after the tenant moved out and while I was preparing the unit to become my personal residence. Yet, most of the expenses were only necessary because of damage done by the tenant. It was not in rentable condition when they moved out.

 

Also, how do I account for the days in between the tenant leaving and me moving in (six weeks when the house was vacant and being repaired)? Are those days considered personal use?