When your insulin levels are deregulated, the receptors in your brain-blood barrier became insulin resistant and despite being drown in a sea of glucose your brain cells cannot access it and let their mitochondria use it to produce energy.
Your brain cells then start malfunctioning and neurotransmitter pathways, like dopamine, serotonin or GABA, get messed up.
This is the link from carbs, to glucose levels, to insulin resistance, to the pathophysiology of neurotransmiter pathways which are the SYMPTOMS, not the CAUSE of mental illness.
Read the book.
Watch videos from metabolicmind.org.
There are a lot of researchers working on metabolic health studies as we speak.