Christ is our hope
Anon asked, "Why do some say that despair is a sin? It doesn't make sense to me. A person does not will or intend it." Thanks, Anon, for your question and comment. The Catechism defines despair as one of the "sins against hope" (presumption is another). It explains: "By despair, man ceases to hope for his personal salvation from God, for help in attaining it or for the forgiveness of his sins. Despair is contrary to God's goodness, to his justice - for the Lord is faithful to his promises - and to his mercy" (#2091).
So, objectively, despair can be a serious sin. It is a grave offense against God. Now, in relation to individual persons and situations, you raise a good point regarding a person's will or intention. Are they actively willing it? Do they intend to lose hope? As with all sins, the degree of culpability of the sin of despair on the part of the individual depends on two things: 1) what he/she knows, and 2) how free he is in his choices.
Regarding what he knows, does he know about Christ and the Kingdom of Heaven? Does he know the hope that Christ brings? Does he know that Christ promises eternal life to those who are faithful to Him? Does he know that God is all merciful, and that he offers forgiveness of sins through Christ? Does he know that there is no sin or circumstance that God does not have power over? The more that we know about Christ and his Gospel of Hope, the more we are culpable if we lose hope.
The rector in my seminary once said, "The greatest tool of the Devil is discouragement". This leads us to the second thing that can make a person more or less guilty of despair: how freely they are choosing to lose hope. The Devil wants each of us to think and believe that there is no hope. He tempts us with this lie; those who fall for this are being deceived by the Father of lies. Does he deceive us by putting thoughts in our minds like, "there is no God" or "there is no Heaven"? Absolutely. But, he can also be much more cunning.
When I think about the way that the devil discourages us, I think about all the things or people other than Christ in which people hope. Many, many single people put their hope in falling in love, that finding the right person will complete them. Many people put their hope in stars - rock stars, movie stars, musicians, celebrities, politicians, etc. Sometimes, people wil out their hope in fictional characters! Now, there's nothing wrong with finding hope in other people, as long as it is hope based in Christ. My point that is that many people will put their faith and hope in man instead of God.
Also, we see all the things to which people go when they are suffering. They often go to alcohol, drugs, fornication, pornography, gambling, adultery, etc. as ways to escape the darkness in their lives. While they may not label these vices as "hope", they are obviously attracted to them in some way, and see some kind of light in them. For many people - many believers even - the road to despair may start with these things. I believe it is the Devil at work from the start - with the lie that they will find "hope" or "salvation" in a bottle or in another person. This may lead to years and years of habitually sinful behavior that we might call "addictions"; with this type of behavior, we might question how much a person is freely choosing anything at that point.
In general terms, I would say that despair is a temptation from the Devil in order to have us lose our hope in Christ. He tempts all of us with thoughts of despair, at one time or another. If we let those thoughts go as soon as they enter, then we commit no sin. We didn't will them. But, when we start to entertain them and pursue them, then we begin to take ownership of them, and are culpable of the sin of despair. If we fully know that Christ is our hope, and freely choose to reject Him as our hope, then our offense against the First Commandment is a mortal sin, and we break our friendship with God.
If we know anyone who is in despair, one fo the best things we can do - other than pray for them - is to live as persons of hope. If we truly believe in Christ and his resurrection, then we will live as men and women of hope. Others will see that, and want to have the same hope.
"Don't ever get so sad that you lose sight of the Resurrection" - Blessed Theresa of Calcutta