Yes there is a difference :
"unhappy" is when one is not content with something or a situation and it takes a longer
span of time .He is unhappy with his life ,means he is not satisfied , which causes
feelings of discontent .
"mad" couldbe insane or crazy as Herman says
or in this context it means rather an advanced state of anger where one could act
aggressively or do stupid things . It usually takes an instant or a certain situation ,it is not a longterm state . " She was so mad at him, that she almost broke up with him."
"upset" when one is anxious and worried in a certain situation ,it is a short termed feeling .
"He got upset when they told him they might not approve his application .
:)