I'm ashamed of being such a fucked up in the head individual.

I fell remorse about a girl I've met 3 years ago. She wanted a relationship but I just wanted us to remain friends. We stopped talking to each other 2 years ago. This girl was already badly hurt so now I can't stop thinking of how I contributed even more to her sadness.
Sometimes I catch myself even imagining what a relationship between us. I have a fucked up mind.

How can I stop it?
edit: For more context. She wasn't a HB7 or something. She was a 3/10 girl with personality problems and little to no friends. I talked to her because I was in a dark place, not because I wanted a relationship.