In early Buddhism, there is the concept of dependant origination. The main part of it is that a sensation arises in the six senses, followed by a feeling of unpleasant/pleasant, followed by your mind craving that feeling followed by clinging onto it by thoughts. IMO emotions are just a byproduct of your attachments to which you crave/cling.