Lincoln's Battle with God: A President's Struggle with Faith and What it Meant for America (Thomas Nelson), by Stephen Mansfield
....
In his 20s, freed from the strict Calvinistic beliefs of his father and other youthful religious influences – including the wild enthusiasms of revival meetings – Lincoln for a time vehemently and publicly rejected the religious givens of contemporary America.
....
This early, fanatical anti-religion, which followed Lincoln even as he became an Illinois legislator and later a lawyer, "makes us wonder if the fuel of this heat wasn't some other hatred entirely," Mansfield says – suggesting it could have been rage against his father, or against petty preachers, or even against a God that had allowed the deaths of his mother, sister and sweetheart.
....
The death of his beloved son, Willie, in the depths of the Civil War might have turned Lincoln permanently from God, but instead confirmed his religious quest, Mansfield argues. Insistently, he asked clergymen for guidance about "the state of the soul after death."
He came to see the unrelenting carnage of the Civil War as God's judgment and punishment for slavery, as he says in his second inaugural shortly before his assassination.