Some of the godliest people struggled with depression. Elijah was one of them. Whether Jesus, as “a man of sorrows and acquainted with grief” was ever depressed may be a matter of semantics.
Depression can come from various sources, IMO. Some people are genetically predisposed to operate in a mildly depressed state — at least most of the time. Others rarely struggle with depression.
Genetics, body chemistry, anger, frustration, disappointment, sad circumstances, pain, stress, weather, unhappiness, sunshine levels….a lot of possible issues.