Feeling guilty after ending the relationship

I feel very guilty after leaving my relationship (because I was unhappy) few days ago and I don’t know what to do.

I care for them a lot but I can’t shake the guilty sad feeling.

I also have an ongoing feeling that I’ve made a mistake or hurt him which I would never want to do.

How do I resolve this?