I had mild Dissociative Identity Disorder and Dissociative Panic. It was actually a result of being trans, but being raised in a traumatic situation that didn't allow me to explore my identity. I basically developed a female persona to live parts of my life for me and make things easier, as well as make people happy. The problem was that, it was only a persona, not a full personality, so when I started to have strong dissociation and dysphoria, there wasn't a full personality left to make proper decisions.
I had that for over 4 years, but when it started falling apart was when I started having panic attacks. I was in therapy for it for a time. Since coming out to close friends almost a year ago I haven't had any dissociation, and since I started living full-time I haven't had any panic attacks or anxiety attacks.
I'm still on anti-depressants, though.