It can be caused by a demon, it's one of the most obvious ones that can be caused by them.
Luk 8:35 Then they went out to see what was done; and came to Jesus, and found the man, out of whom the devils were departed, sitting at the feet of Jesus, clothed, and in his right mind: and they were afraid.
Luk 8:35 Then they went out to see what was done; and came to Jesus, and found the man, out of whom the devils were departed, sitting at the feet of Jesus, clothed, and in his right mind: and they were afraid.
When we open ourselves to Jesus, when we give Him all of our troubles, when we give up trying to make things work and let God work, then depression leaves as if it had never been. His joy, and His peace, those are His promises to us. We don't need to pray the problem, for the problem is that we are not trusting in Him. If we open to Him, in trust and love, (hard to separate those two,) He will show us His love and the peace of having God as our keeper.
Yes, sometimes demons can cause depression, and many other mental problems. The presence of Jesus will still cause them to flee. And then He will make a home in the heart of the one so afflicted. And He will heal the heart and the mind, in ways that are hard to believe, even after seeing this many times. There are no formulas for this, only an open heart to the Lord Jesus.