I'm reading William James, The Varieties of Religious Experience and finding it great fun (not being under pressure to get through it). At one point James is arguing that melancholy can only be called religious if is ennobling. In contrast he describes Schopenhauer and Nietzsche: "The sallies of the two German authors remind one, half the time, of the sick shriekings of two dying rats."
I envy the big arguments of the 19th century (the book was published in 1902). James argues that we have to accept that the universe is not ordered for our convenience; we are forced into "sacrifices and surrenders of some sort." But without a belief in a higher good, one is left with "the drab discolored way of stoic resignation to necessity." The value of religion, then, is that: "Religion thus makes easy and felicitous what in any case is necessary." (quotes from lecture II).
Wendell Berry would say that we have come to believe that with technology we can order the universe for our own convenience, and it is that refusal to face limits that is destroying the world.