It’s understandable that you could be confused about why an antidepressant medication would be prescribed to treat pain, but it’s not an unusual treatment for chronic pain, especially if it’s nerve pain. Some antidepressants have an analgesic or pain killing effect. Some of these medications are amitriptaline, imipramine (Tofranil), nortriptyline (Pamelor), desipramine (Norpramine), venlefaxine (Effexor), and duloxetine (Cymbalta). Duloxetine has been approved by the FDA for use in both depression and pain caused by nerve injury.
That being said, sometimes doctors do use antidepressants to treat an underlying depression that can occur with chronic pain. They may feel that the depression is worsening the pain, then the pain worsens the depression and we have a cycle that needs to be broken.