You can't claim foregone rent as a rental expense. To do so, you would first have to claim the rent as income, then take the expense, so it would have no impact on your net rental income. The other answer is completely wrong.
If you claim the property as rental property any income from the property is added to your income and any expense incurred in maintaining it including payments you have to make during rental absence months and any maintenance contract payments.
Let's be clear here. As long as you were trying to rent it out the entire year, any expenses incurred in that year are deductible against the rent income for the year, even if it creates a loss and even if some of those expenses were incurred when it was vacant. "Payments" can be different than "expenses." A mortgage payment is not entirely deductible because a portion is interest "expense" (deductible) and a portion is loan principle (not deductible). Lastly, if your income is above certain limits, not all rental losses are deductible but TurboTax will handle that part beautifully. This comment posted by a CPA.
The question asks was the property rented all year. If it wasn't, answer no. You can't claim the lost rent as an expense. You can claim any expenses you had to refurbish the property to prepare it for the next tenant. Hope this helps. Also if you had costs because you had to evict a tenant you can deduct your legal expenses and court costs.