You keep trying to discount mental illnesses by treating them as symptoms of other illnesses that we all would agree deserve to be firearm restricted. The problem is that they are all mental illnesses under the DSM. You can define them more specifically as "learning disorders" or "eating disorders" or whatever else you want, but they are all encompassed under the term "mental illness" which is any dysfunction that effects your thinking, mood or behavior.
I really think at this point you are just being intentionally obtuse because you don't want to admit the application is too broad, and that you were wrong in using the term "mental illness" when you just meant some mental illnesses.
Because you don't mind restricting rights to quell irrational fears. I do.
People who drive cars are more likely to die in a traffic accident. People who climb ladders are more likely to die from falling off them.
Context is everything.