There's no exact answer here -- you can never be sure what might have been. But given that he got just under 40% of the popular vote and 180 out of 303 electoral votes, at first glance it seems quite possible.
That 40% figure is a little misleading, though, because a lot of that 60% of the vote he didn't get was in the South, and he wasn't even on the ballot in most of the slave states. His 40% of the vote nationwide was concentrated in the North, and he got pretty good majorities in every state he won but New Jersey, Oregon, and California.
The Democratic Party got incredibly fractured, splitting its voters into four camps: those that went with Republicans, those that opposed slavery but still favored Douglas and his platform, those that liked slavery, and those that just wanted to keep the country together. This isn't to say that Democrats were the only ones not voting Republican, since in the chaotic electoral environment a few minor parties were still around, like Free Soilers, American, Free Silver, etc., but Democrats and Republicans were the two big base factions.
The Democratic Party's convention was the biggest disaster any party has ever seen; there were 57 rounds of balloting, and while Douglas was ahead in every single one by close to 100 votes, he needed a 2/3 majority to win, and most of the delegates from the slave states that bothered to come hated his guts. After those 57 ballots, they decided to try again in a month and a half; this time, the slave state delegates walked out when the convention wouldn't approve a platform plank calling for slavery in all the territories, and with them gone Douglas got the nomination easily. It was a hollow victory, though.
Without the slave states, Fremont would have beaten Buchanan, and Douglas just lost them all.
The slave states had their own convention ten days later, and nominated John Breckinridge, Buchanan's vice president. Breckinridge was virtually certain to win the vast majority of the South, but even if he won the entirety of the region, that wouldn't be enough.
The few who were left, mostly Southern Whigs and anti-immigrants who didn't like Douglas, Lincoln, or Breckinridge, formed the Constitutional Union Party, devoted to "the Union as it is, and the Constitution as it is". An admirable effort to keep the country together, which did decently in the border states, but there were no more compromises palatable to slave states and free states.
As it happens, keeping Lincoln from winning on election night isn't that difficult: if nobody gets a majority of the electoral vote from the College, the top three candidates go to the House. So the task here is to find 29 votes that Lincoln barely won; if he goes down to 151, that's just short of a majority.
Most of those are pretty easy; Lincoln won Illinois' 11 votes with 172,000 votes to Douglas' 160,000. New Jersey had more votes for Democratic electors, but the Southern Democratic faction chose several people for their slate, so the votes got split. Lincoln got 4 votes from that mixup. In Oregon, Lincoln got 5,329 votes against John Breckinridge's 5,075, adding 3 to his total. Lastly, California tossed 4 votes into Lincoln's pile, despite him beating Douglas' 37,999 by 734. Put all those states into the other columns and Lincoln loses 22 votes, still distinctly under the 29 we need.
That's not a huge problem, but it does mean this scenario gets less likely. We've gone from "minor changes in the campaigns" to "several skilled former Whigs decide Douglas has a better plan than Lincoln". However, given the chaos in the electoral system (one major party splits into two pieces, the other is running in its second election), it's still not too implausible.
The next closest state that Lincoln won actually brings us over the top: Indiana had 13 votes at the time, taking Lincoln down to 145 votes. However, he garnered 139,000 votes, beating Douglas' 115,000 by a much larger margin than everything else combined. This isn't too bad: Lincoln's two biggest losses in this scenario are Illinois and Indiana, so having Northern Democrats surge there and Republicans falter is far from an outlandish scenario.
So. Lincoln gets 145 votes, Breckinridge gets 77, Bell gets 51, and Douglas brings up the rear with 40. With this scenario, the House chooses between Lincoln, Breckinridge, and Bell -- the House elected in 1858, with one vote per state. There, Republicans had the majority of the delegations from CT, IN, IA, KS, MA, ME, MI, MN, NH, NJ, NY, OH, PA, RI, TN*, VT, and WI -- seventeen states, just over half the thirty-two then in the Union. However, since NJ, TN, and IN didn't vote for Lincoln in this scenario, they might feel obligated to consider the outcome of the state's vote. The most likely outcome here is still that Republican operatives convince Northern Democrats that Lincoln is a safer bet, and that Douglas cannot keep the South in the Union.
The vice presidency is a different scenario; each Senator gets one vote, and Republicans had only 23 out of 62 seats. Moreover, while the House could pick from the top three candidates, the Senate was limited to only two: Lincoln's running mate, Hannibal Hamlin, and Breckinridge's running mate, Joseph Lane. Here this post becomes almost entirely speculation: the House would likely have chosen first, since Lincoln would already have been close to winning, and his victory likely still would have spurred Southern secession. This would have reduced opposition in the Senate, both from southerners no longer being there to cast a vote against Hamlin, and from northerners fearful of splitting the Union.
But what if Douglas did better still? Lincoln took New York 362,000 to 312,000 for the fusion ticket; had his campaigners turned off the Democrats more, and failed to get out the vote as effectively, its 35 votes would have split 18 to Douglas, 10 to Bell, and 7 to Breckinridge. We now have 110 for Lincoln, 84 for Breckinridge, 61 to Bell, and 58 for Douglas. The most plausible state to change to bring Douglas into the House is Virginia, in which Breckinridge and Bell both got over 74,000 votes, but Bell beat him out by only 156. Giving that to Breckinridge is extremely easy, which puts the totals at 110 for Lincoln, 99 for Breckinridge, 58 for Douglas, and 46 for Bell.
This situation takes a lot of leverage from Republicans, since there's now one more state that can't be counted on to be in their corner, and Lincoln is a lot closer to equaling Breckinridge than doubling him. Still, northern support is needed for any candidate to win, and Douglas has a better claim on it than Breckinridge. In real life, Kentucky Senator John Crittenden offered several Constitutional amendments protecting slavery after Lincoln's victory, in an attempt to preserve national unity. Douglas might have been able to secure Southern delegations with that promise, along with his full support for pro-slavery Joseph Lane of Oregon as vice president.
So there you have it. A slim theoretical scenario for Lincoln's loss, and secession might have been somewhat assuaged. Not fully, of course, but with a much smaller Confederacy, the Civil War could have been shorter and less bloody.
*-Tennessee had 7 out of 10 Opposition members, which at the time was an organization opposing slavery in the West. Grouping them with Republicans here is arguable, but plausible.