Yes, I agree with the above posters. Because no one is perfect, it is important to set an example for how to handle your imperfections:
Acknowledge what you did wrong.
Explain why it was wrong (if the kid doesn't already understand).
Do what you can to correct the problem, including apologizing, and be sure to emphasize the importance of this.
After this, you might want to offer some kind of explanation for your behavior, such as, "I have meltdowns. They're very bad because they upset people. It's hard for me to control them, but I am working on this. It's important to me to get better at controlling these meltdowns because I want to be the best parent I can be for you, since you're so important to me."