Amitriptyline, sold under the brand name Elavil among others, is a tricyclic antidepressant primarily used to treat cyclic vomiting syndrome, major depressive disorder and a variety of pain syndromes from neuropathic pain to fibromyalgia to migraine and tension headaches.