It nearly happened as in Lincoln won by 10 percent, and even if you give New York, Connecticut and Pennsylvania to McClellan (who, by some miracle, wins 5% more across the board), it still does not give him anywhere close to a majority in the Electoral College (it breaks 147-86). Considering McClellan's stance on the war, which was at odds with the Democratic platform and Vallandingham's, there is no sure way to say he would have thrown in the towel since he was NOT a peace candidate. Especially if that conniving coward could see that victory was in sight. And Lincoln might have pushed extra hard as a lame duck. By March 1865, the Confederacy was finished. McClellan would just have said that it was due to his extraordinary brilliance that Lee and Johnston surrendered.
There was no reliable way to poll people. Remember the 1936 election? Gallup had a better methodology than the Literary Digest which relied on (mostly affluent) people to send back coupons and got it right. The mood before Atlanta was one of unease but it was not one of defeatism. McPherson acknowledges in Battlecry of Freedom that Atlanta had to fall to absolutely secure Lincoln's reelection. But he also pointed out that the morale of the Army of the Potomac had completely shifted when Grant pushed south after the Wilderness instead of doing like Lee wanted and run. Union soldiers wrote home all the time. Their growing confidence would have influenced their families at home. Despite the growing casualties and the stalemate at Petersburg, I very much doubt the US voters were very keen to let the goal escape from their grasp when they had never been so close to Richmond. Except if someone can produce a reliable analysis of a mass of diaries, letters and the like saying that Abe Lincoln did not deserve reelection from the North before Atlanta fell, I consider the possibility that he would have lost as wishful thinking at best.
Edit: I just tested it out. To lose the electoral vote, Lincoln has to lose, in addition to Delaware, Kentucky and New Jersey: New York (relatively easy, less than 1% between the candidates), Connecticut (under 3%, could maybe swing without Atlanta), Pennsylvania (harder, 3.5%), New Hampshire (over 5% between the two), Oregon (7.8%), Indiana (7%) and Illinois (8.8%)! all for a piddly 120 to 113 advantage to McClellan in the Electoral College. That assumes a rise of a bare minimum of 4.5% in Illinois for Little Mac. Even without Atlanta, it's not happening.