Below is a list of foundational emotions. These emotions were developed in our deep past, some when we were still animals. All of these emotions have very specific reason why they were adapted.
Fear
Mother of all emotions. Fear is one of the most fundamental mechanisms regulating approach or avoid decisions.
Anger
Reaction to obstacles, highly energetic
Sadness
In the past there was really high child mortality, if there was only anger mothers would be only destructive member of the group for months. Reversely sadness is a low energy emotion that regulates Anger.
Happiness
Reward for achieving or accomplishing something. There is way more negative than positive foundational emotions. Evolutionarily negative emotions were more important for survival.
Shame
Is a social child of fear. Shame is a social emotion. Humans couldn't physically out compete larger predators so they had to gather in groups. Shame helped control the group through setting social norms. Humans feel shame or embarasment when they cross this norms. Shame is internalized society in us.
Disgust
Disgust regulates what is good for an animal to eat or be in contact with. Excrements, food that is rotten or dirty may poison an animal if consumed.