It is easy to see the line of reasoning here:
• Men are that they might have joy. (2 Nephi 2:25)
• Joy comes from obeying God and following the Plan of Happiness.
• A depressed or otherwise mentally ill person often has feelings of guilt, shame, pain, and a loss of the Spirit – the opposite of joy.
• Sin, too, leads to feelings of guilt, shame, pain, and a loss of the Spirit.
• Wickedness never was happiness. (Alma 41:10)
• Unhappiness must be caused by wickedness.
• A perpetually unhappy person must be a wicked person.
• Mental illness is caused by sin.
But three important facts are missing from this line of reasoning.
First, our mortal bodies have a limited repertoire of senses by which we perceive the world and a limited repertoire of physiological and emotional responses to those things we perceive. We must use the neurological, chemical, and conscious pathways that are available, and several experiences may be processed via the same pathways.
Let’s say I injure my finger. Whether my finger is cut, crushed, poked, or burned, the signal sent to my brain will be “PAIN!” and my natural response will be to move away from the thing causing the pain and then try to relieve that pain. My perception is limited to (1) the kind and quality of nerves that run from the point of injury to my brain (if they are numbed or severed, I won’t feel anything), (2) any other available sensory pathways (e.g., vision) that can tell me there’s a problem, and (3) my brain’s ability to receive and appropriately interpret those signals. My physical response is limited to what I can physically do: if unrestrained I will move away, perhaps even jump—but I probably won’t fly. My emotional response is also limited to the kind and quality of emotions I am able to experience that correspond to the experience of physical pain. It makes sense that different experiences can be processed through the same channels and lead to similar emotions.
Second, while there may be some overlap in the emotional response to sin and the emotional response to mental illness, those overlapping negative feelings do not describe the entire experience of either one. Unlike mental illness, sin involves some kind of choice. And mental illness is not just restricted to “negative feelings.” For example, in addition to depressed mood, clinical depression generally involves anhedonia (the inability to experience pleasure) and physiological symptoms (disruption in patterns of eating, sleeping, energy, etc.) – which sin clearly does not cause, and which no amount of repentance will relieve.
Third, everyone sins. If sin were the primary cause of mental illness, then everyone would be mentally ill!
Mental illness-as-consequence is problematic in several other ways. It is an arbitrary punishment with no connection between our choices and their natural consequences or their effects on others. Each punishment would lead to a reduced capacity to exercise agency, repent, make changes, and progress. It would almost certainly damage our relationship with Heavenly Father and would thwart the very plan he wants us to follow in order to return to him. Clearly, this is not how God works.
Just as sin does not necessarily cause mental illness, living righteously and repenting does not cure or make people immune from life’s challenges and difficulties, including mental illness. According to Elder Alexander B. Morrison, “The truth is that many faithful Latter-day Saints who live the commandments and honor their covenants experience struggles with mental illness or are required to deal with the intense pain and suffering of morally righteous but mentally ill family members.”
We should not add to their pain and suffering by accusing them of sin.