In a case like this, await the result of the medical investigations before trying to find psychological causes to your problems.
But yes, depression can have pain as a symptom. Read more. But whether this is the cause of your pain cannot be decided until somatic causes of your pain have been ruled out.