The “if” implies that the other person is responsible for being hurt instead of you. It transfers the guilt onto their shoulders implying that their response is the problem, not your action. It’s a double-whammy of pain.
1) Wait until you are truly sincere and the other person is ready to listen.
2) Acknowledge that what you did was hurtful.