The effects of pain on cognitive function and incidence of depression There have been studies about  the link between depression and cognitive function..

There have been studies between pain and cognitive function. This has, also, been discussed in this question here.

There have been studies linking pain and depression.

From a biochemical viewpoint:
Are pain, depression and cognitive function intrinsically linked?
Is it possible for chronic pain not to have an effect on cognitive function and the likelihood of depression?
This may be more of a non-answer than an answer, but here it goes.

When you're talking about the effect of something like pain, it's valuable to first understand some of the complexity. While it's easy to put things in boxes in practice, (physical pain, emotional pain, etc.) it's very difficult to put those things in boxes when you're talking about a neuropsychological response like pain. While there are breakthroughs being made in understanding specific parts and functions of the chemical soup that is the human brain, it's still largely a mystery as to how those parts interact, not to mention how our psychological state affects/is affected by our brains.

Can pain affect mood and general ability to function? I think it's safe to say it can. When we feel pain all kind of stress hormones with significant amounts of adrenaline, (such as Corticosteroid) are release that ideally will only be there for a short amount of time and then fade away. When you have chronic pain, your body doesn't get a chance to recover from the heightened state of arousal. This is known to affect many parts of general function negatively and probably is somewhat similar to the affect of long term chronic pain.

As far whether there is an intrinsic biochemical link between an actual depressive disorder and the brain's ability to function, I think there just isn't enough understanding about what happens in the brain to answer that properly. Depression itself is still a hot topic of debate as to how it develops, and since plenty of evidence supports it being both a psychological and neurological disorder, it would also depend on the individual's psyche as to whether they would develop depression. Pain, even chronic pain, has been dealt with successfully by people without much change in their life. Chronic pain has also destroyed people's lives. Any response is probably possible. At this point there are simply too many variables (many of of which are not yet understood) in order to make any statement as to what is normal. 

The brain has really only began to be explored and understood, and while theories abound, with many questions like this the only honest answer at this point is that we don't know. At least not yet.