Another post at Mises CA:
Someone might choose to go to the gym and lift heavy weights, rather than sit on the couch eating pizza. Thus the lifting of the weights gave more utility, even though it was physically painful and very unpleasant per se. Or, a person might choose martyrdom over renouncing her religious or political views. Again, this embrace of death gives more utility to the martyr, but it doesn’t convey happiness or pleasure in any hedonistic sense.