The primary hypothesis is that an individually tailored CBT-treatment administered through the internet can be beneficial for patients suffering from chronic pain and comorbid psychiatric distress. The investigators expect that patients in the treatment group will show reduced levels of disability, depression and anxiety, while improving on scales measuring coping and quality of life.