Are mental disorders just what happens when our brain receives training data (environment during childhood) outside the typical parameters we have evolved for (abusive, negligent), which it then over-fits, rendering us incapable of responding correctly to normal training data (healthy relationships) until we receive enough new training data in controlled environments like therapy (re-training the neural net by adding new training data and trying to snip away bad data) to balance us again...?
No, it's much more complex than that. You have to include other stuff like genetics, stress on your parents when you weren't even born yet (what is epigenetics?), and probably other stuff we don't even suspect (intestinal biota?).
Not saying what you said is wrong but that it is incomplete.