You may file either way, married filing jointly or separately.
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 .