hi im 38yr old now but when i was 19 yrs old i had my first bout of depersonalization after dieting so much (carb restriction). to cope, i ditched all diet and made sure i ate right amount of carbs since it is food for the brain. i refrained from all junk foods then.
i took exams while having depersonalization and i was able to graduate college and even got a degree in MA.
just ignore it, just go on with your life. take time to reflect on life no matter how bleak.
one thing you can do to really help urself is maintain a very healthy lifestyle of clean carbohydrates at least 100grams each day, 40 grams of clean protein from steamed fish and lots of vegetables, extra virgin olive oil.
it will help your mind work better.