Mental illnesses are categorized based on observation of symptoms and trends, which can be measured and treated, even though we can't write an equation that fully explains how they came about.
It's like how you can troubleshoot problems on your computer without knowing how to write an OS or build a motherboard.