The IRS addresses this exact situation, with an important starting condition: you have already changed your name with Social Security. Its answer is to report all your income on one return. Ask the employer that used your former name to correct the form with SSA so it reflects the name on your Social Security card.
There are two jobs here: you report your income, and the employer corrects its wage reporting. The IRS says you may correct the name on the W-2 copies you use to file. If your employer sends a W-2c, the IRS says to include a copy with your return. Correcting your own copy does not replace asking the employer to correct its report.
If you have not changed your name with SSA, the premise is different. The IRS says to use the name matching your Social Security card. Marriage itself does not require a surname change to file jointly.