I'm sorry for your loss. If your spouse died during the year (2016), 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 .