Meditation also helps
Another thing that might cause depressive episodes are the loud thoughts that run through your mind. Meditating helps in channeling this thought. Meditation may be weird advice for somebody who is experiencing a huge deal of pain, but as implied earlier, the higher the anxiety and depressive thought, the higher levels of pain and discomfort.
Guided meditations are now all over the internet, which helps in calming the mind and putting things into perspective. It will not hurt anybody to try, and by doing this on a daily basis, it may help bring some peace of mind, as well as with managing stress.