Emotions will effect a spell. They can be used to help it or hurt it. Often people cast when they are more focused on the emotion they are feeling and what they think will make it better. This, in my opinion, is not a good way to cast. One should be focused on the desired result for a good outcome. This should come after processing the emotional state you are in, the facts of your situation, and finding a clear intention that you want to achieve.
That said, emotions can help in the raising and releasing of energy. Anger and love can add a lot to a spell. However, both can detract from the spell if the emotion is controlling you.
If you are angry over a small slight done to you by a friend and allow that anger to influence your decision of a spell to cast you can wind up in a far worse situation. I find that I choose to wait until a very strong emotion has faded before I work magic. I've written some lovely curses based on anger at a situation and later found it to not be worth the effort when I have cooled down.
Be aware if it is you casting the spell or the strong emotion you are feeling.