All perceptions is our life primarily starts with our five senses. What we see, hear, touch, smell or taste adds to our database of experiences we hold from when we are born. Some experiences we love, some we hate, some we just accept but all of them is within us to refer to. This love and hate perceptions converts to emotions which we tend to display. Anger, jealousy, greed etc are experienced based on which experience we enjoy and which we detest in our life.
Awareness and absorption of our experiences is a mandatory biological process but converting it into negative emotions is optional and is done by your mind. People who are happy are the ones where they convert any of their experiences either into positive emotions or ignore them. People who seem unhappy seem to convert and hold on to negative emotions. For example, One can see a person full of joy and either become jealous or feel happy. One can help someone and feel joyful or expect something back. Choice is ours.