Short answer: depression alters our perception of reality, and a perception of reality is all that we have.
I see this is under the broad category of philosophy. Philosophy starts with an assumption, mine being that the universe I perceive around me is real (and even if I am a brain in a vat hooked to a computer that is running a simulation, I cannot absolutely determine that, so I might as well proceed as though it is real since the software is great and it is a lot of fun).
Science also begins with my assumption that the universe is real and that I can perceive it, but only in a limited sense. That being the case, observation and experimentation, both of which can be verified by others, are my best tools to evaluate the world.
As I said, all we have is our perception of reality. Whether that perception is an accurate representation of the universe is another matter. The very best we can do is assess reality by observation and experimentation using logic and reason. No one's perception of the universe is entirely accurate or complete.
This process occurs in our brain, a bag of neurons, chemicals, and electricity that responds both to the physical universe, our perception of it, and the effect that both have upon it. This includes the meanings we ascribe to different things we experience, be they people, things, words in a book, spoken words, etc. Genetics, physical trauma, emotional trauma, and the environment all have impact.
Depression has a physical cause in the brain that changes a person's perception of the world around them, but there is more to it than just balancing the chemicals in the brain. The entire body is involved, including the hormones, central and peripheral nervous systems, musculature, skin, and all our senses. The impact our experiences have is also a factor. Cases of depression vary from mild clinical depression to major depressive disorder, and only a trained professional can help assess the severity of depression and suggest a course of action. This is where philosophy and science meet, understanding that our perception of the world is based on factors than can be altered - that depression is not hopeless.
What Causes Depression - Harvard Health
All that to say this: Many people who have been successfully treated or remain under treatment for depression find that the world around them that used to seem so empty is now full of meaning and joy. It is the same world (perhaps with some personal changes when required) presenting the same opportunities, but despair has now been replaced with hope. The perception has changed.