I was going to ask you to check whether this quote was valid or not, because about one thing I a absolutely and fully trust you, is the willingness to disprove any smear against Lincoln. If this quote was made up, I believed you would be able and willing to prove it.
And then I found this reference, so I now believe this quote was not made up.
Godless Liberal?
If you take the time to look, you'll find many quotes from Lincoln on the subject of religion.
These show Lincoln was not less religious than, for examples, our Founders, or even current President.
I would put Lincoln's Christian faith as vastly stronger than any recent Democrat President.
Here is a link to several such Lincoln quotes.
As for Herndon's claims, he is the Michael Cohen of that day-- not to be believed.
Again I refer you to Lincoln's own words on the subject.
Among my favorite is:
"I have been driven many times upon my knees by the overwhelming conviction that I had no where else to go.
My own wisdom and that of all about me seemed insufficient for that day."