Well I'm pretty sure you already know this but abusing yourself, leads to self-loathing and loss of self-esteem and self-respect which leads to further self-abuse in a desperate attempt at self-validation. In other words it's a vicious cycle. The only way out is to draw a line in the sand and stop abusing yourself. Is that doable for you, or do you feel heavily addicted? Is it a question of self-esteem or more of addiction?
You should respect yourself. If we don't even respect ourselves, how can we expect others to respect us? Even if you are so depressed that you can't think of anything good about yourself, the very fact that you want to stop this self-destructive behaviour is pretty amazing in itself!
Breaking free from masturbation is not easy.
Trust me, the further you go into recovery, the better you will feel physically, emotionally, mentally and spiritually. The need to self-medicate when life gets rough and tough will just seem unnecessary.
Take things one step at a time and one day at a time. Hope that helps!
BW,
DL