Mental Disorder:  A substantial disorder of the person’s emotional processes, thought, cognition or memory. Mental disorder is distinguished from:

(a) Conditions that are primarily those of drug abuse, alcoholism or mental retardation, unless, in addition to one or more of these conditions, the person has a mental disorder;

(b) The declining mental abilities that directly accompany impending death; and

(c) Character and personality disorders characterized by lifelong and deeply ingrained antisocial behavior patterns, including sexual behaviors that are abnormal and prohibited by statute unless the behavior results from a mental disorder.