Understanding how I create this part 2

I’ve been thinking more about this situation, and I want to offer a better apology. I can see that I was in a headspace of needing things to be perfect, plus lots of doubt and confusion. I totally projected it onto her and it wasn’t very thoughtful or kind. I know I don’t cause her feelings, and that things happened as it should (I had the opportunity to see this pattern freshly!) but I also don’t like my behavior, thoughts, and the result it created for me/the circumstance it created for my friend.

I’ve realized in this process how cruel I can be to myself. I seem to have crossed wires when it comes to making a mistake and believing I’m a horrible worthless person. This is OLD patterning based on thinking I needed to exceed expectations/be perfect/manage everyone’s emotions in my family to deserve love. So I see this, am feeling the feelings, and am trying to choose a different path.

I want to apologize from a genuine place while also being kind to myself. Is this a situation where feeling something like “regretful” is useful? Is there a better emotion to apologize from? Any suggestions for moving to the other side of this?