This study was carried out to assess the prevalence of major depressive disorder (MDD) in persons suffering from pain symptoms in various locations, both with and without comorbid somatic disorders and to analyze the single and combined effects of MDD, pain symptoms and somatic disorders on general functioning in the community. The 12-month prevalence of MDD, somatic disorders and pain symptoms, grouped according to location, were determined among 4181 participants from a community sample. Depression was assessed utilising the Composite International Diagnostic Interview. Pain symptoms were self-reported by participants whereas medical diagnoses were validated by medical examinations. General functioning was evaluated utilising the established MOS-SF-36 scale. The prevalence of MDD was significantly increased for persons with pain in any location. In the absence of a somatic disorder, MDD prevalence was highest in persons with abdominal/chest pain (9.3%) and arm or leg pain (7.9%) and lowest in persons with back pain (6.2%). Mental and physical well-being were lowest for persons with both MDD and a somatic disorder, irrespective of pain locations. Increasing numbers of pain locations impaired mental and physical well-being across all groups, but the effect on mental well-being was most marked in participants with MDD and comorbid somatic disorders. The presence of pain increases risk of associated MDD. The number of pain locations experienced, rather than the specific location of pain, has the greatest impact on general functioning. Not only chronic pain, but pain of any type may be an indicator of MDD and decreased general functioning.