Derealisation and dissociation is the worstโฆ you're not going crazy. It's over now, and if it ever comes again, it will pass. You are going to be okay, you're not an anomaly or broken. I've experienced it, and many others have too.
Below, and you can ignore this if you want, are things that may be helpful. Do what works for you.
I personally as someone with a diagnosis of a dissociative disorder found certain ways to ground effective, like trying to distract my brain by doing easy mathematics, or when it gets really bad, trying to use an intense sensory sensation like a strong mint or something. DIS-SOS has some techniques specifically for dissociation:
https://www.dis-sos.com/orientation-and-grounding/ https://www.dis-sos.com/dbt-skills-mind/ https://www.dis-sos.com/dbt-skills-body/ in order to use re severity of derealisation. I've heard 5-4-3-2-1 grounding technique is helpful for some, but not for me.
Obviously this doesn't work all the time, otherwise I wouldn't dissociate at all.
For anxiety I have a little bottle of orange oilโ
it's been found to have a statistically significant anxiety reduction effect on women in labour. I'm neither a woman nor in labour, but it works. There's also progressive muscle relaxation where you tense and then release every muscle you can. Personally deep breathing doesn't help.