I would say that it depends on when things started to go wrong in the relationship. In other words, sometimes people stay in bad relationships for a long time for whatever reason, but their heart has already moved on. If that is not the case, I would wait at least 6 months before dating again. At least. The main thing is that you are not just getting into another relationship because you are afraid to be alone. I think you will know deep down whether or not that is the case. If you are afraid to be alone, then you need to spend some time along to gain security in yourself. Otherwise, if you have been emotionally over him for awhile and want to date someone because you really like them (vs. being afraid to be alone), then go for it. Just take it REALLY SLOW, because what tends to happen is that we break-up with someone and go for somone who is opposite of the type of person we were with before. That can cause us to become deceived about whether or not we really like the person or just want something totally different than what we had before. Whatever you do, don't have sex for awhile. A long while. And expect some grief from those around you.
To answer your question about the child, I would say that you should wait longer if you have a child or just make sure you keep the dating separate from the child. Don't expose the child to any new man until you are in a committed, long-term relationship.