I find your post similar to my situation… but I am in my 2nd year of my Ph.D.PhD and not finishing yet.
You can talk with someone trusted at the department or faculty. Maybe some representative of Ph.D.PhD students to highlight the situation.
I am really sorry that this happened to you. Please don't sabotage yourself and do not make this situation be responsible for your self-esteem and mental health.
What I can advise you and what I also do (not to be very stressed in any situation) is to switch off emotions and be an observer of a problem. I usually remain emotionless even if the situation is stressful because I kind of switch off my emotional state. It does not influence me on any level.
It would be good to finish your Ph.D.PhD as it is now, not making any drama. You are about to end your Ph.D.PhD journey soon - maybe it's better to remain as it is but try to search for scientific opportunities on your own. Do you want to stay at the department when you finish your Ph.D.PhD? Maybe it would be good to leave academia after you graduate…