The way we feel about ourself is a major influence of how we perceive things.
The way we feel about ourselves (our self-concept) greatly influences the way we perceive the world around us. If you are feeling down-and-out, worthless, useless and unlikeable, you may perceive a request or statement as confirmation of this belief that you are worthless, useless and unlikeable. The result is you hear the request/statement as an attack or put-down. You may snap and get angry at the person because of this perception. If you had been feeling good and happy with yourself and the world around you, the request/statement would have been perceived as something less attacking. This perception of an attack becomes a self-fulfilling prophecy, confirming your worse fears of actually being worthless, useless and unlikeable.
It is interesting to note that while you're learning, it's easier to remember all you learnt if you get back into the same mood you were in when you first learned it. The reason is that when you learn something, it is laid down in your memory linked to the emotions you were experiencing at the time. This emotion can be used as a trigger to help with recalling what it is that you learnt.