You're not wrong at all - just get that right out of your head. Do not let misplaced guilt control you. You did nothing wrong - he did.
Are you going to meetings or getting any counseling? When you are in the heart of abuse and addiction its really hard to see the truth of the situation - talking to others about this could really help you see things clearly. The abusive person can really confuse our thoughts on right and wrong and manipulate us through our love. that's how they keep us coming back. I promise you that years from now when you look back you'll only remember the facts and you'll know that you did the right thing for yourself and your child.