Deductions & credits

Yes you will get credit for it on your tax return.  Just like withholding from your paychecks.  You will get a 1099R form for it.  The gross amount (before the withholding) will be taxable.  Hopefully the 20% will cover the tax on the withdrawal.  So you might get a refund or owe some more.  If it is a Covid-19 related withdrawal you might avoid the extra 10% Early Withdrawal Penalty.