Shame about my past

When I was younger, I dated a man almost 30 years older than me. Turns out, it wasn’t a very healthy relationship, and it didn’t end well. Now, when I think about this episode in my life, I am riddled with disgust and shame. Those feelings are also triggered when I hear of another girl dating an older man, which is quite common. Do you have any thoughts about how I can think about it differently, so I can make peace with this relationship and with myself?