In 1901 and 1902 William James gave a series of lectures that became The Varieties of Religious Experience, notable because he was "the first to recognize that pathological mental abnormality lies at the heart of much religious experience." But that didn't lead James to write it off:
What he absolutely can’t accept is that having ‘diagnosed’ a religious feeling (i.e. having established a physical or psychological cause for it), we’re bound then to the view that science has ‘solved’ it or indeed finished with it. To assign a cause, says James, is not the same thing as defining something’s essential character, let alone its worth. Just as we wouldn’t say that we’ve ‘solved’ a painting, for example, by discovering that the artist painted it because he or she desperately needed the money that week. What James does throughout the Varieties is to probe the shortfall between the rich variety of our experience and the thin partiality of our attempts to explain it by recourse to terminology, abstraction, and authority.
He’s constantly worried that we’re being encouraged by a certain type of scientific analysis to put our faith in abstracted explanations, often at the expense of our own experiences — the only things that we can truly know anyway. In the Varieties James is examining the emotional fundamentals not only of religious belief, but of all belief. And now, when we live with a constantly re-staged theatre of antipathy between religion and science, it might be that a book which reminds us how provisional, how contingent, how emotional, but also how enriching are the foundations on which we all build our beliefs about the world around us.