Some words to avoid: “I’m sorry if you feel that way.”
This invalidates the listener’s feelings. It certainly is not an apology.
Rather say, “I apologize for doing [whatever it is you did], I can see it upset you. I did not intend to do that. Help me understand what went wrong here.”