I've been dp dr free for years. The main cause for me was doing things completely out of line with who I was. I was pursuing fashion design, which I hated, to get to live in New York. I had to leave NY and slowly I started to learn my true passions- history, business, writing, singing. When I started to follow my heart miracles happened.
I also had abuse as a kid. I was angry at the person that caused it but didn't know how to express my anger. There were many issues around that.
I also had an eating disorder which was a trigger.
When we hide our true selves- by not following our true interests, by hiding our emotions, by being in codependent relationships, by not standing up for ourselves, etcetera, we get DP.
Medication helps but I completely disagree with anyone who thinks that it's the be all end all. You have to learn the causes and conditions.
And for gods sake, you are not going crazy. You have no clue how far away from psychosis you are. It's something completely different.
There is a guy I think it's DM...read his posts. They are key to the answers you are looking for.