Because you were married for some time in 2021, you may file a joint return for the year for you and your deceased spouse, provided you did not remarry before the end of 2021. If there is an executor or estate representative other than yourself, that representative must agree to the joint return.
Eligible taxpayers may claim a tax credit for 10%, 20%, or 50% of up to $2,000 of retirement plan contributions.