Amitriptyline, sold under the brand name Elavil among others, is a medicine used to treat a number of mental illnesses. These include major depressive disorder and anxiety disorder, and less commonly attention deficit hyperactivity disorder and bipolar disorder. Other uses include prevention of migraines, treatment of neuropathic pain such as fibromyalgia and postherpetic neuralgia, and less commonly insomnia. It is in the tricyclic antidepressant (TCA) class and its exact mechanism of action is unclear. Amitriptyline is taken by mouth.