despair is extreme shock and generally hopelessness. See post #4495470 and post #9876180; it usually happens after the character witnesses a terrible event or has a horrible revelation.
desperation is when someone is putting maximum effort or taking a big risk to prevent something bad from happening, usually out of fear. See post #9402289 and post #9067223; in each image there is a distressed person (one grimacing and the other sweating) carrying another unconscious person, presumably to find help or refuge out of fear that the carried person will die.
I suppose despair can look similar to desperation because the latter is often a result of the former, but despair leans more to the passive side and desperation implies action.
A depiction of despair like post #4738787 could be changed to one of desperation if she grabbed hold of you to prevent your departure.