Brain damage (head trauma) can cause mental illness. But mental illness certainly does not always come from brain damage.
Untreated mental illness can definitely do damage to the brain.
No one at this time knows whether psych meds cause brain damage or not.