Basic Trope: A mental disorder that causes inventiveness.
Straight: Supercognitive Antisocial Disorder (SAD) causes bizarre thought processes that lead to amazing inventions and superhuman intellectual achievement. On the other hand, these same thought processes cause its sufferers to lose their grip on reality.
Exaggerated: SAD causes its users to be completely absorbed with their work and hardly notice the real world.
Justified: SAD causes its sufferers to compulsively hyperfocus on things. It makes day-to-day life hard for its sufferers, but when they concentrate on one thing at the expense of everything else, it becomes a little easier to manage.
Inverted: SAD causes its users to be hyper-sane but terrible with technology.
A Mad Scientist just turns out to have an already-established mental disorder.
Lampshaded: "Geez, what's up with mad scientists? Is there a medical condition that causes intelligent megalomania or something?" "Actually..."
Invoked: A mad scientist operates on his son's brain, trying to induce SRMD.
Defied: A mad scientist specifically hires a psychologist to explain his mental condition doesn't relate to his technical skills.
Deconstructed: SAD causes some technical expertise, but its nature causes its sufferers to neglect safety protocols, waste their talents on trivial pursuits, blow themselves up, or turn their creations on the rest of humanity.
Reconstructed: When medicated properly, a mad scientist can retain some of his edge while still maintaining something of a grip on sanity. In the story, it becomes a plot point of how long a character needed for their technical expertise can go without trying to turn his companions into hats.
Played For Laughs: A character with SAD is used for cheap jokes the way conditions like Down Syndrome and Aspergers sometimes are.
Played For Drama: A couple discovers that their kid has SAD, and the story revolves around the parents trying to get along with their lives and raise their kid.