Amitriptyline is a tricyclic antidepressant primarily used to treat depression, anxiety disorders, and certain types of chronic pain, such as migraines and neuropathic pain. It works by affecting the balance of neurotransmitters in the brain, particularly serotonin and norepinephrine. Amitriptyline can also be prescribed for insomnia and other off-label uses. Common side effects include drowsiness, dry mouth, and weight gain.