|from Wikipedia, "List of Cognitive Biases"|
But to claim that ordinary misinformed delusions including religion are a mental disorder carries a tacit assumption that the human brain is somehow a perfect cognition machine and could only be wrong when defective. This assumes the brain was created to be perfect, or has evolved to perfection. When exposed, this assumption is obviously dumb. The human brain (and body) is so obviously anything but perfect in the healthy natural state.
Cognitive biases and built-in fallacies in the natural way a healthy human brain functions are more than enough to account for religious experience. We have the Bias of Agency which makes the brain assume something it doesn't understand is evidence of some agent acting in the environment. We have Confirmation Bias which makes confirmatory evidence apparent and suppresses disconfirmatory evidence. We have Motivated Reasoning in which something we need to be true in order to avoid unpleasant emotions or social isolation can quite readily be made to seem fully true by the brain. These are all things that a healthy, normal brain does.
Overcoming these natural thinking defects requires an overlay of artificial thinking tools that Nature has not provided us with, but which humans have invented, passed on, and perfected over the last 10,000 years in particular, and which we now use to be better thinkers. We can, when trained, identify, avoid, correct, and overcome fallacious reasoning, cognitive biases, emotional biases, and social motivations that favour a dodgy conclusion over a correct one.
But it is quite unpopular in the PC Age to suggest that some mental disorders are the sufferer's own fault - that they may be the result of an incorrect utilization of the brain by the brain's owner. My experience is precisely that - practically all of my own neuroses (anguish, self-destructive tendencies and suffering) and some of my psychoses (clinical pathologies e.g. depression) are the result of me using my brain in dumb ways, and correct themselves when I can be bothered to use my brain in smart ways.
However there has been clinical evidence found that serious mental disorders are more prevalent among the fervently religious. Unknown is whether this is causal (religion messes up people's brains and lives), contra-causal (pre-existing mental illness attracts people to religion), both, or just a coincidence. It would be helpful if religions in their position of privilege and platform would actually teach people effective ways to manage common disorders such as depression, anxiety, addictive/compulsive behaviours, etc. But they offer mere placebos instead, and I think they don't even want to know anything about how the brain really works lest their fragile mythology about humans come into question.
In order to fix problems of mind, like fixing problems in a car, it is absolutely prerequisite to understand how the thing operates. We must accept the brain as a physical machine and not as a magical conduit to/from a perfect infallible agency. Think for even a moment about the concept of "sin." If the Free Agent Ghost Hypothesis were correct, there would not be such a thing as sin, because the ghost would have the agency to decide not to sin. But we see daily examples of devoutly religious people sinning repeatedly, and they don't know why. "Oh the devil is tempting them!" Well then do we have free agency or don't we? No - observed human behaviour does not support the ghost hypothesis. Only the brain as a conditioned environmental modeling survival machine fits the data.
When I learned how to operate the brain, I discovered free agency for the first time and "sin" in my life as a devoutly religious man simply vanished. Shortly thereafter, without sin I found I no longer experienced guilt. Without guilt, religion was somehow just not as important as it used to be. When I didn't need religion to be true anymore, both socially and personally, the motivated reasoning fell, and within weeks the apparent logical cohesion of my religious beliefs had vanished into thin air, exposing the many negative and harmful aspects of it as well as all the logical inconsistencies and factual inaccuracies of it. Without religion, being a happy, good, and decent person is easier than ever and life has far more meaning and wonder. But religions teach that people like me are sinful and are lying about not believing in order to not face my sins. Religion does itself no favour by employing such demonstrably, provably dishonest troll tactics.
Does it matter to me that everybody who was ever a part of my life and who is still religious assumes I must be engaged in some vile sinful acts as the only possible explanation for why I am no longer religious? I could experience that feeling if I wanted to, but I choose not to use my brain in that way. Got better things to do with my neurons.