It's a somewhat little-known fact that Lincoln was ill, likely with smallpox, when he delivered his Gettysburg address. On the train ride to Gettysburg he felt weak and dizzy, but still gave the speech with no issues, though he did appear pale and felt ill. On the ride back to Washington, Lincoln's health worsened, complaining of a severe headache. Not long after returning to the Executive Mansion, he developed back pains, high fever, and a rash that developed into the telltale itchy, peeling lesions.
While his doctor diagnosed his condition as a milder form of the illness now called Variola minor, a 2007 study by the Journal of Medical Biography determined that this could not be the case. Variola minor was never observed in the US before the end of the 19th century, so was unknown to American doctors at the time. Lincoln more likely had the life-threatening form, Variola major. Lincoln's son Tad and valet William Johnson also became ill, Johnson dying in January 1864.
Lincoln recovered, but what if he hadn't? Hannibal Hamlin was seldom involved in any of the decisions Lincoln made, though he was a firm supporter of the Emancipation Proclamation and black troops. He also pressed for Joe Hooker to be made commander of the Army of the Potomac.
How much he'll keep lockstep with Lincoln's OTL decisions, I'm not sure; he might decide to leave Washington when Early approaches the city, which could provide easy Democratic fodder in the election. Then again, I'm not sure if Hamlin would be nominated by the Union Party in 1864.