Depression is a state of low mood, often associated with hopelessness and apathy. It's not simply sadness, that may be part of it, but sadness can be a normal transient response to upsetting events, while depression is more rooted in dysfunctional brain activity, with symptoms persisting for weeks. At that point, it's referred to as major depressive disorder and considered medically serious.
Personality can factor into the expression of depression. Some people may become withdrawn and hesitant to socialize, having feelings of guilt and worthlessness, while some may be excessively irritable and hostile. The common thread, again, isn't necessarily sadness but may be mild anhedonia—a diminished ability to feel pleasure.
Foods and supplements that affect depression may do so through altering brain energetics, neurogenesis, and synaptic plasticity, and may do this through being neurotransmitters and hormones, affecting their synthesis, reuptake, and signaling, affecting inflammatory signaling, ion channel function, protecting neurons, and more.
By far, the most common way to measure depression is through the use of various questionnaires designed to rate the severity of known symptoms of depression. There are other approaches such as behavioral assessments, and neuroimaging, but those are much less common in research.