You are better off taking the $2,000 credit rather then the $4,000 deduction. The credit is a dollar for dollar reduction in your tax while the deduction savings is the $4,000 x your tax rate. Unless you're paying more then a 50% tax rate, the credit is a better deal.
Ex: $4,000 x 25% tax rate = $1,000 tax savings versus $2,000 tax savings with credit.