If your child has observed your behavior, it's especially important that you be honest. A simple statement is appropriate in most cases; there is no need to turn your admission into a major event.
Follow up with an apology to anyone you have treated badly and, if possible, by making up for what you have done.
U.S. Department of Education
Office of Educational Research And Improvement
Helping Your Child Learn Responsible Behavior