Check out this article by Harvard Medical on pain and depression.
Depression and pain
Hurting bodies and suffering minds often require the same treatment.
Pain, especially chronic pain, is an emotional condition as well as a physical sensation. It is a complex experience that affects thought, mood, and behavior and can lead to isolation, immobility, and drug dependence.
In those ways, it resembles depression, and the relationship is intimate. Pain is depressing, and depression causes and intensifies pain. People with chronic pain have three times the average risk of developing psychiatric symptoms — usually mood or anxiety disorders — and depressed patients have three times the average risk of developing chronic pain…