Depression is not the absence of happiness, I'm not sure where I read that. But I think that needs to be clarified since a lot of people seem to believe that a person who says they are depressed just needs to do more "fun" things or that they are the cause of this "lack" in motivational pursuits.
If it was the imagination, would it make a difference? The heart feels what it feels in great magnitude, there is no measure of emotions when it comes to how a person "feels". Yes, we can attribute this dip in moods to chemicals and/or external forces but if you were happy and I told you it was all in your imagination would it make a difference?
As for the realness of depression, there are no words to describe the despair that befalls a person when nothing will do. At that point you start to wish it was all a fiction of your imagination, but at that point when you're most susceptible to hopelessness, well, it becomes as real as any light in a dark room.