A new study has identified the association between an increase in use of opioid medicines to manage chronic pain and an increase in depression.