Discouragement and depression can come for many reasons. We all brush up against them- when we lose someone to death, for example, or experience a problem that overwhelms us. Depression may even come from chemical imbalances in our bodies; when it is that case, modern medicine often can help.
At the same time, when we feel discouraged or depressed we need to turn to God in prayer and commit the situation into His hands. This isn't a substitute for medical treatment if we need it: God ordained the physical laws that govern our bodies, and He can use the insights of medical science to bring healing. But ultimately...when we face problems of any kind we need to turn to Jesus, our Help and Healer.
" Be joyful in hope, patient in affliction, faithful in prayer."- Romans 12:12