This is sometimes known as psychological hedonism , the view that our behavior is driven not just by self-interest of any kind, but instead more specifically by the prospect of making us feel better.
Again, this may have been Hobbes’ view. Against such a view, one might doubt that the self-sacrificing solider is really jumping on the grenade out of a fear for how unpleasant it would be to remain alive.