Widow(er)s are eligible to file a joint income tax return with your deceased spouse for the year the death occurred (assuming you have not remarried). Also, for the next two years, you may be eligible for special benefits as a “qualifying widower” See IRS Publication 501 for details. https://www.irs.gov/forms-pubs/about-publication-501
Click on the Publication 501 link in the website to get a PDF. It says it’s for filing 2017 returns but the website indicates there are no recent changes. See page 9 of the PDF for “Qualifying Widower” status.
“This filing status entitles you to use joint return tax rates and the highest standard deduction amount (if you don’t itemize deductions) for the two years following the year of spouse’s death.
So you can file a joint return for the year the death occurred and then use “qualifying widower” status for the following two years.
Source: Financial Planning for Women