Self-torture

Webster's Dictionary of the English Language

·noun The act of inflicting pain on one's self; pain inflicted on one's self.