On an incredibly simplistic level, you can think of depression as occurring when your cortex thinks an abstract thought and manages to convince the rest of the brain that this is as real as a physical stressor.
Why Zebras Don't Get Ulcers (ed. Macmillan, 2004) - ISBN: 9781429935654