see you family doctor and ask for referal for clinical psychologist. Medecial treatment corrects the disorder. You will be fine, it is not a huge problem.
Friendly remind: Don't say anything about your attempt or behavoir in any forms of abuse to your child is if he/she is still young. You doctor might ask you questions about abuse, so be prepared and give your answer selectively.