Chronic pain is what you get when something goes wrong which makes your body constantly tell you "I hurt". Pain is supposed to be a warning that you've hurt yourself, to tell you to tend to the injury and avoid using that hurt part. With chronic pain, there might be an actual injury, but sometimes there isn't, or it's an old one that's long since healed up. The pain is entirely useless, it's hurting because something's misfiring, because something was once wrong rather than because anything is necessarily wrong now.
The allusion to depression is obvious. Depression usually starts because there's something wrong emotionally - grief, or stress, or abuse. But then it goes on, way past the original problem and turns into a new problem of its own. You're left poking around your psyche, trying to find reasons for it, and there genuinely aren't any - there aren't any more sources of stress or grief left, you've dealt with all of them. Yet it's still there, entirely useless pain, hurting because something was once wrong.