How do I tell someone I hurt because I was insecure?

I want to tell them im sorry for how I acted... mental health is no excuse to treat someone so poor. Low key I liked them but now I reap what I sow

How do I tell someone I hurt because I was insecure?
Post Opinion