I created an account to answer this topic because I've had a similar experience, and I want you to know that you aren't alone. It's hard, but it gets better. For me it was my undergrad advisor and it totally screwed with my head. I was seventeen when it began and at that age I was insecure and sure I was in the wrong. It can be really difficult to talk about these issues to people in academia. In my experience bringing them up automatically makes people uncomfortable, or at the very least unsure of how to respond. Some people just take it as departmental drama, or maybe they see discussing these things as unprofessional or above their pay grade. So in a way this post isn't just aimed at you, but at everyone out there reading this. I do not believe that any issue can be solved without willingness to discuss it openly. By sweeping this under the rug we're perpetuating a culture that shames and implicates survivors.
Many people will not understand what you're going through or why it was damaging. Many people will feel uncomfortable acknowledging what happened to you or discussing it. It's important to remember that these are their problems, not yours. You haven't done anything wrong, and it's totally normal to feel traumatized after experiences like this (it does sound to me like you have some form of PTSD -- have you been diagnosed? A psychologist can do that. Psychiatrists/social workers/counselors can't, at least in the US.)
I had nightmares for 2-3 years after getting out of the situation I was in. I'm not sure why they stopped. I have some theories, but I hesitate to proclaim that I have a solution. So I'm just going to list the mess of reasons I think helped me. Some are more easy (and desirable) to recreate than others.
I found people I could trust to help me in my immediate environment. I think it's really difficult to move on when you're scared that you might be trapped in the same situation again, with no one to help/support you.
I realized that he (my then-advisor) did not have the power he claimed to have. (Backstory: he actually told me that he would ruin my career if I stopped working with him -- and I believed him. I switched labs/fields anyways, but I never thought I'd be able to get into grad school. I thought he'd sabotage it. Wrong. I got in and I'm working with some fantastic people. I'm pretty underwhelmed by anyone who says things like that now.)
I was harassed by a colleague and was able to deal with it immediately and effectively. That showed me that I could handle things if they came up.
I made friends with a lot of people who had experienced similar things. It gave me space to be myself with people who understood what I was feeling. Actually, my best friend went through something similar at the same time I did (though at a different university). We still talk about it regularly (see #5).
I have made it part of my personal mission to help eradicate these issues. It's not something I bring up in personal statements or when talking about career goals, but it's always at the back of my mind when I think about what I want to do. I want the power to help and support students who get into these kinds of situations (note: I'm not just talking about sexual harassment but any issues of injustice.)
I'm going to end my monologue, I can't fit it all on my screen anymore But please feel free to message me if you want to talk. I know how isolating this kind of thing can be. One last resource I'd like to mention is the link below. It's to a crowdsourced survey of sexual harassment in academia -- so it's not methodologically rigorous in the way a research study would be, but it definitely shows that these problems are far from uncommon.
https://theprofessorisin.com/2017/12/01/a-crowdsourced-survey-of-sexual-harassment-in-the-academy/
Hugs and best of luck!