Depression, can be caused by many different things–and the first step in dealing with it is to find out the specific cause. Only then can it be treated properly.
For example, depression (I'm told) is often caused by a chemical imbalance in the brain–and when that is the case, it often can be corrected with proper medication. If your doctor believes this is the reason for your problem, I would encourage you to heed his advice. God gave doctors and their medical knowledge to us; one of the Apostle Paul's closest companions was Luke, whom he called "the beloved physician" (Colossians 4:14, KJV).
Yes, God can intervene and heal in some instances–and certainly we should come to Him in prayer whatever we face, including a physical or emotional problem. The Bible tells us to "pray for each other so that you may be healed. The prayer of a righteous man (or woman) is powerful and effective" (James 5:16).
But this doesn't mean we shouldn't seek medical advice when we are sick. If I broke my arm, I'd get the best medical treatment possible–and the same is true if I had an emotional problem. God loves you, and He wants you to get better. Let the Psalmist's words encourage you: "Though you have made me see troubles ... from the depths of the earth you will again bring me up" (Psalm 71:20).