The link between emotions and creativity
In an evolutionary sense, negative emotions like fear are designed to make us focus narrowly on a threat (e.g. is that moving thing a snake?). Positive emotions like feeling happy or upbeat are designed to make us want to explore, try new things, learn new information, and build relationships with other people. Positive emotions signal to us that the current environment is safe enough that we can do things to prepare for the future. When people are experiencing positive emotions, they tend to look at the whole picture rather than details (i.e. attention is broader).
Research shows that there are links between emotions and creativity, but It´s not as simple as it might seem, and some emotions does´t seem to affect creativity at all. Read about this and more in the article mentioned above.