Elavil (amitriptyline) is a tricyclic antidepressant. Elavil affects chemicals in the brain that may be unbalanced in people with depression. Elavil is used to treat symptoms of depression. You should not use Elavil if you have recently had a heart attack. Do not use Elavil if you have used an MAO inhibitor in the past 14 days, such as isocarboxazid, linezolid, methylene blue injection, phenelzine, rasagiline, selegiline, or tranylcypromine.