I'm sorry for your loss.
The IRS allows you to file Married Filing Jointly in the year of your spouse's passing.
If you claim dependents, you also may claim Qualifying Widow/er for two years, in this case, 2017 and 2018.
From IRS' Publication 17:
Spouse died during the year.
If your spouse died during the year, you are considered married for the whole year for filing status purposes.
If you didn't remarry before the end of the tax year, you can file a joint return for yourself and your deceased spouse. For the next 2 years, you may be entitled to the special benefits described later under
Qualifying Widow(er) With Dependent Child
.
If you remarried before the end of the tax year, you can file a joint return with your new spouse. Your deceased spouse's filing status is married filing separately for that year.