No one is perfect, we all make mistakes from time to time, but if you have made up your mind to apologize, please be ready to do it the right way. See How to not apologize to your partner during a fight:
1. Don’t say they once did the same thing: This is pointless. As you say sorry, there is no need to say that. Just take responsibility and move on.
2. Don’t remind them of how good you’ve been: Because you have been good for a long time does not mean you have a right to misbehave and see nothing wrong with it.
3. Do not use a nasty tone: Do not apologize with an attitude.
4. Do not blame someone else: Please, don’t say it was the alcohol.
5. Don’t act like it is not a big deal: Do not downplay what you did. If your partner is pissed, that is serious enough.