The things we think about strengthen the synaptic links for those thoughts (simplification). The more you think about something the more easily you will think about them.
I think this is an issue as those thoughts you have are messed up, as you know
Personally i think you need to work on your self esteem issues and being assertive, advocating for your needs- and quickly dismissing bad thoughts as they arise. Ruminating on negative experiences will only deteriorate your mental state.
I have been in your place but my coping method was to take anonymous petty revenge and use dark majic against them- until a counselor pointed out that it was a pathetic way to live my life. She pointed out that it i had asserted myself originally then i wouldn't have got to a point where i built up resentments and mentally burnt bridges. People are not generally mind readers and i need to advocate for myself.
Thankyou for coming to my TED talk.