When your spouse passes away, you are permitted to file as married filing jointly in the year of death. Then, if you have a qualifying dependent, you can file as qualifying widower for the next two years. Please view the Turbo Tax FAQ below for more information.
https://ttlc.intuit.com/replies/4206146
Please view the IRS link below for more information about the qualifying widower filing status.
https://www.irs.gov/publications/p17/ch02.html#en_US_2014_publink1000170830