Deductions & credits

under IRC sec 1341, if the repayment is for an amount taxed in a prior year and more than $3000, the options are a deduction - 1341)(a)(4) - or a credit computed by refiguring the tax for the year received excluding the amount of the repayment 1341(a)(5) 

https://www.law.cornell.edu/uscode/text/26/1341