Mental health diagnosis and treatment is often difficult because there are no or very few biological tests that doctors can conduct, instead relying on the person's own experiences, thoughts, and assessment. When doctors do run tests, it is often to rule out physical disorders such as Vitamin D deficiency, prion disease, or a thyroid disorder. There are tests that measure serotonin levels in your blood, but those levels are not necessarily correlated with the levels in your brain.
We very much wish there were reliable biological markers for mental illness, but it has been difficult to locate something that has a high chance of being a specific predictor. Eiko Fried explores this in great detail in his article titled "All mental disorders are brain disorders....not", which is a bit of a dense read, but this excerpt hits the broad notes.
"As a thought experiment, choose one of the most prevalent mental disorders, such as MDD, phobias, or generalized anxiety disorder, and take a dataset with 200 healthy and 200 people with this mental illness; the dataset should include a wide range of social, psychological, and biological variables. Now your challenge is to pick one single variable that correctly classifies at least 60% of the participants. You would not pick 5-HTTLPR (the serotonin-transporter-linked polymorphic region that has been implicated in MDD), or hippocampal volume, or inflammation markers, because associations are generally extremely weak (and also unspecific). You would choose psychological or social variables to try to maximize your chances for prediction, such as adverse life events."
And while an easy, testable diagnosis would be great, the money spent on the biological research might be better spent on more practical aspects of mental illness treatment, such as long-term housing, free or reduced-cost therapists, psychiatrists, and medication, increased mental health first aid training for first responders, or mental health education in schools. Because what good is a test that says "yup, you definitely have depression" if we don't also have the support and appropriate treatment available.