What is the purpose of our emotions?


I am thinking about the concept of feelings being harmless and I came to the question of: What is the purpose of our emotions?