Social impacts can be associated with mental illness, but they do not define it.
From the American Psychiatric Association:
"Mental illnesses are health conditions involving changes in emotion, thinking or behavior (or a combination of these). Mental illnesses are associated with distress and/or problems functioning in social, work or family activities."
> distress and/or problems functioning in social, work or family activities
For some mental illnesses, this pretty much does amount to society defining the condition. That doesn't mean they aren't real, just that diagnostic standards including "interferes with functioning" will necessarily shift as the meaning of everyday functioning varies.
The classic example is someone with poor cognitive control meeting the ADHD standard of "difficulty in at least two settings". Trouble maintaining a home, but not socially or professionally, doesn't suffice, but trouble in home and education does. So the same person could be mentally ill in a place with compulsory education through 18, but not mentally ill in a place where they drop out of school earlier and find a job that works for them.
From the American Psychiatric Association:
"Mental illnesses are health conditions involving changes in emotion, thinking or behavior (or a combination of these). Mental illnesses are associated with distress and/or problems functioning in social, work or family activities."
https://www.psychiatry.org/patients-families/what-is-mental-...