According to the peak-end rule, we judge our past experiences almost entirely on how they were at their peak (pleasant or unpleasant) and how they ended. The rule states that we do not judge our experiences on the net pleasantness of unpleasantness or on how long the experience lasted.
Blog posts
Practical Advice Backed By Deep Theories—Knowledge of this heuristic might be useful in fighting akrasia.