The fact that messed up is not a good thing. If I mess up, apologize sincerely and genuinely attempt to not do it again, the problem is addressed and usually I am forgiven. Believe it or not, this builds trust.
Try saying, "I am really sorry that I messed up and hurt you. I did not mean to hurt you. Here is what I will do to make sure that does not happen again." This is not a free pass and your actions need to match your words in order to fully earn that trust back.
What happens when I mess up and do not apologize? That is when it appears to be intentional by the other person. I had a chance to make up for it, if it was a mistake and I did not even attempt to make up for it? That is going to hurt a relationship. I am communicating , "I really do not care that I hurt you. I am not accountable."
This is less likely to be forgiven in a relationship. It chips away at the trust.
Now imagine if the mess up was a big one and you have already chipped away at the trust in the relationship for awhile.
Let me know what you think,
Don