Are you being treated for your dislocated spine? The neck spasms can be due to that. Your doctor can prescribe you medications to help relax the neck muscles so that you can sleep better.
Please see a psychiatrist so that he/she can help you with your depression and insomnia. The "neck popping" that you mentioned can be a symptom of Obsessive-Compulsive Anxiety Disorder (OCAD), which is entirely different from OCD.
You might be obsessing about your neck pain and your compulsion is the "neck popping" in order to counteract the pain. Am I right?
OCAD is acquired, meaning there is an identifiable cause, and is recognized by patients as absurd. They try to resist doing the repetitive acts and fear that they may lose control.
OCD, on the other hand, is a personality disorder (you're born with it), lifelong, and pervasive. These people are perfectionists and are excessively stubborn.