Emotions are survival mechanisms, but they don’t always work for the individual. They work across a large number of trials to keep the species alive. The individual may live or die, but over a few million years, more mammals lived than died by letting emotion take over, and so emotion was selected.