you might want to look up writings by his friend Moncure Conway.
Conway's an interesting character. He used to be a Methodist minister from the South, but then went to Harvard's Divinity School and became a Unitarian minister. He was an abolitionist (despite his family's support of slavery) and was asked to leave the Unitarian church he ministered to in DC because of his staunch anti-slavery beliefs.
He was a liberal Christian for a time (like many Unitarians were back then, see James Freeman Clarke's Manual of Unitarian Belief
http://www.americanunitarian.org/manual.htm, especially his definitions of liberal and rational Christianity) and a transcendentalist, but then determined that Christianity couldn't be saved from itself. He became an expatriate while in England promoting the Northern cause during the Civil War, and founded a freethought society there that stil exists.
He wrote a biography of Thomas Paine, a book on demonology and devl lore from around the world, an anthology of religious writings from around the world, served as Twain's literary rep in England...fascinating guy. I'm reading some of his sermons from a 1907 "best of collection" called Lessons for the Day...topics include "A Freethinker's Vision Beyond Death," "Orthodox Belief and Unbelieving Orthodoxy," "New Views on Natural Religion". These are from a collection from the 1870s/'80s, and one of them in that collection was "What Can India Teach Us?", which I think may have influenced Twain. If he didn't read that sermon, he definitely read the book by Max Mueller (India--What Can it Teach Us?). Mueller was also friends with Conway.
Throughout his life, Twain developed a rep for ridiculing religion (especially Christian orthodoxy). He was even accused of being a "son of the devil" by one pious preacher (which I believe gave Twain great delight). Still, by his own admission, Twain said he was always trying to deconstruct the bullshit (my word, not his) that people made up about religious experience, not what he saw as the real thing beneath the bullshit.
Personally, in terms of Twain's beliefs, I see him fluctuating throughout his adult life between the kind of liberalized Christianity his friend Joe Twichell preached (Twichell himself was influenced by his Civil War chaplaincy and by Horace Bushnell, a minister brought up unsuccessfully on charges of heresy by more orthodox types) and Conway (who was influenced by Emerson and friends with Thoreau and interested in Eastern philosophy). Twain was also apparently influenced by William James's work (according to a book by Jason Gary Horn).
Toward the end of his life, I believe Twain was much closer to Conway's views than to Twichell's, but they were his unique (and at times perplexing) views. Still, reading the things written by people he admired suggests to me that there was much more to the religious dynamic of his times than a simple either/or dichotomy.