I haven't read the whole thread, but just responding to the subject-line, I don't think that religion is a socially-accepted mental illness.
That would suggest that not only is a solid majority of the world's population mentally ill, it would suggest that mental illness is kind of a cultural universal in human societies.
That raises problems in defining 'illness'. That word suggests a state in which the ill individual deviates in a negative direction from some physiological (or in this case psychological) norm. But if a great majority of the population displays the state in question, then we are going to have a problem with defining the norm that isn't being met. It certainly can't be statistical.
We seem to be drifting towards a new kind of definition, in which 'illness' is redefined as deviation from some idealized state of perfection. And that pushes 'illness' dangerously close to the older meaning of 'sin'.
That's not to suggest that religion is always a good thing or that it's always rational. I'm just suggesting that 'mental illness' might not be the best way to conceptualize the phenomenon. It's something a lot more basic in normal human psychology.
My speculation is that it's kind of an 'unintended consequence' resulting from other, more adaptive, psychological traits. There's our sense of closure, our typical confidence that we have the big picture generally figured out. Since there are inevitably going to be huge objective gaps in that picture, we seem to fill them in imaginatively. There's our human social instincts that make us most comfortable around other human beings and make us naturally think in terms of meaning and conscious intentions, leading to our tendency to anthropomorphize non-human reality and to imagine personal deities. And there's the observation that human beings tend to find meaning in their own lives (and by extension in the universe as a whole) by fitting events into narrative stories.