In the back of my mind, I'm almost certain there are at least several individual English word that means to punish one's self. It doesn't have to be physical, necessarily, but it must be some kind of self-punishment. Are there such words? Clinical words are also accepted (i.e. psychological terminology).
Asceticism is a form of self-denial, or voluntary suffering, especially as a way of life. It isn't always associated with guilt though.
Clinically, self-harm is grouped into different categories, but there doesn't seem to be one catch-all single-word term for it--just a collection of acronyms as outlined here from Wikipedia:
Self-harm (SH), also referred to as self-injury (SI), self-inflicted violence (SIV), Non-Suicidal Self Injury (NSSI) or self-injurious behaviour (SIB), refers to a spectrum of behaviours where demonstrable injury is self-inflicted. An example of self-harm/self-injury is cutting and is the second most common form of self-harm in the UK. The term self-mutilation is also sometimes used, although this phrase evokes connotations that some find worrisome, inaccurate, or offensive.
I've heard people who cut themselves referred to, nonclinically, as cutters. Of course, the more specific you get in terms of what harm is being done, the more choices there are for clinical terms describing that particular compulsion, e.g., bulimia, anorexia, trichotillomania, algolagnia, etc. Then there's the whole realm of body modification, and a host of other specific terms like scarification.
Masochism is the first that comes to mind, but I seem to remember the word misogynist him being used as an alternate definition but I can't find verification for it on any of the online dictionaries.I realize that misogynist is most recognized definition is the hatred of women but I seem to recall it being used in the context that you're referring to. Hope this helps.