For the year of death, the surviving spouse may still file a joint return if not remarried by year-end. The surviving spouse can sign the return for the deceased spouse as long as no personal representative has been appointed. Otherwise, the personal representative would have to sign the joint return.
See the section titled “Death of a Taxpayer” in the Form 1040 instructions for specific requirements when submitting a paper return.
There is no need to attach a copy of the death certificate to the federal tax return. However, some states may require a copy of the death certificate be submitted with a taxpayer's final state return, so check with your state’s tax authority in this regard.