One goes to see a doctor, preferably a psychiatrist or a psychologist who interview you, have you take a test (often BDI-II, Beck Depression Inventory) and a mental state exam, and then they evaluate based on the gathered info whether you're depressed or not, and if, how much. Then a shrink may...