I totally understand the seductiveness of hurting yourself -- it feels like instant relief but as you said, sets you up for shame and guilt later. I found it helpful to give myself permission to hurt myself TOMORROW; then in the morning, delay another few hours etc. Sounds hokey but it helped me hang on.