I keep punishing myself

I seem to be once again developing a habit of punishing myself when I do something wrong. I used to SH but I managed to get over that quite a few years back.

I haven’t gone back to physical self harm but I have been denying myself the social contact that I need because I feel that I don’t deserve it.

For example, I failed my driving test a few weeks back and I have told myself that I’m not allowed to go to any social events because I have failed.

Recently, I have had some online therapy which really helped but I’m feeling that I’ve really been letting myself down again and I’m in two minds on whether I should go back into therapy again. Or does anyone have any books or blogs or excercises that can help me to build my self esteem? I’m really not sure what to do😢