Despair involves the opposite or absence of hope (Moroni 10:22). Moroni says despair comes because of iniquity.
When recounting his experience just prior to the First Vision, in one part Joseph said he was about to sink into despair due to being seized upon by the adversary... Here is a boy, out in the woods praying to God inspired by a phrase from James in The New Testament. Nothing in that would have produced a whole lot of despair. The despair in this situation doesn't seem to be the kind that came from Joseph's 14 year old iniquity. This despair he says he was about to sink into appears and is described as having come from the actual unseen being that sought his destruction. (JSH-16)
Satan's presence was one of despair. He is the author of iniquity so it would make sense that despair accompanies him. It's opposite is hope. Satan seeks to destroy hope, which leads to despair and regret.
Because of the Lord, there is always hope.