First, you have to accept that when you were a child, other people were afflicting you with their own internal pain: you are not to blame for this. Negative self-blame can be very chronic and damaging. It can reduce your healthy self-esteem to virtually nothing and gain you doubt about yourself for most of the time in your life experiences.
Second, you have to stop saying yourself "you deserve it". When you do this, you are not being emotionally honest. Yes, maybe your sins deserve certain punishments. However, telling yourself you deserve the pain in your childhood, you are reinforcing the "attitude" that we should be apathetic about others' abuses. You may be supporting abusers all around the world if you think that since you as a child deserved the abuse, then others should do nothing about the abuse.
Third, you have to stop hating others. This means you have to be compassionate. Others may still be having so much emotional pain, and they ought to be pitied if they choose to inflict this pain on others. We should pray for them that they may be converted and healed of their wounds. This is not easy. In order to forgive, we need to allow ourselves to pain all the pain that was inflicted on us. We cannot let go of something we did not choose to pick up.
After the hard work of the third step, then you can begin to let go of the unconscious resentments that cause you so much problems. You can now stop your internal emotional chaos, and begin to see the goal of understanding and loving others as a worthwhile and positive mission for you to pursue. Such a goal can help you to see yourself as a person with purpose, someone who is not only here for his or her own eager-someone born for greater things.
Finally, you can stop unconsciously punishing yourself. This kind of self-punishment is not any kind of true penance. It is unconsciously being pursued to numb your own guilt and pain. If for mistakes and sins, you need to really to make up for these, then do not pursue masochistic tendencies, but rather see what you can contribute to the world around you. When you find your skills and talents, live the life you want by doing much good for others showing that you can achieve a rewarding life on earth.