According to modern evolutionary theory, our emotions evolved to guide our behaviour. However, different emotions evolved at different times.
Primal emotions, such as fear, are associated with ancient parts of the brain and presumably among our pre-mammal ancestors to keep us safe. These emotions evolved first and have an obvious physiological effect. For example, fear means the hormone adrenaline is released into our blood and circulates to increase our heart and breathing rate, to subsequently provide more energy to our muscles so we can scarper more quickly from the giant creature that is about to eat us or enemy that tried to ambush us. Anger does a similar thing and can result in increased strength and aggression which might be totally appropriate if we are under attack or need to forcefully make something happen. Disgust makes us reel backwards and prevents us from eating something revolting and bacteria laden so that our health remains intact.
Social emotions, such as guilt and pride, evolved later among social primates. These also helped us as belonging to a ‘tribe’ generally increased our chances of survival as the teamwork within our group helped to feed us, keep us sheltered, warm and safe. It was much easier to survive as a group than as an individual. These social emotions regulated our behaviour and could make us more 'palatable' to our tribe. Shame and guilt, for example, evolved to teach us what was unacceptable to others so we might conform and accommodate others needs more readily. Love had the ability to help us affiliate and care for our tribe and its offspring.
Unfortunately however, the behavioural instructions associated with emotions developed to deal with ancient adaptive challenges may, at times, not be optimal for dealing with modern-day challenges! Stress, for example, is the result of adrenaline being triggered unhelpfully when we are in the grip of a modern day perceived 'fear' that does not require an energy boost at all as there is absolutely no genuine, immediate danger to our life. One could argue that the aggression that anger can induce does not mean we always deal with modern day situations in an appropriate way. Some of the social emotions are still relevant but our survival is not so dependent upon getting on with the group and we have systems in place (e.g. laws, rules, conditioning) that means you could argue social emotions don't need to be quite as intense and bothersome as they can be. So as humans we are lumbered with a slightly outdated system.
Of course this information does not on its own help us manage our emotions more effectively but it does put them in context and explain why they can be quite so overwhelming in often an unwelcome way! I think it can be helpful for children to understand why humans got emotions that are not always 100% useful.