Depression and despair are easy to understand. It is a memory of a feeling that you had when something bad happened to you.
Your mind is trying to heal you by releasing the negative energy. Allow it, by releasing the grief or anger or fear.
Then you can relive the memory of the experience that made you sad, and can put that memory in its proper place – your past.
You can use guided meditations or other methods to help you return to the painful memory in a safe way, and release the emotion attached to the memory. Then, that painful experience will no longer hold you back in life. You will be free of that chain.