Thyroid can be tricky to treat and the most common medicine used, Synthroid, is often problematic for a fair share of people who need to supplement thyroid. Some people do far better with compounded natural thyroid hormones. I don't actually know enough about this, but if you suspect your thyroid is giving you problems it's worth finding a doctor who thinks outside the proverbial conventional medicine box.
Let me be clear: people sometimes behave in ways that look incomprehensible or even insane. Suicidal behavior, profoundly delusional speech, and irresistible compulsions represent severe behavioral problems for individuals and society. No doubt they stem from cognitive activity and emotional tones that differ from average day-to-day awareness. These sorts of disordered conduct do indeed derive from ‘mental’ processes, but do they qualify as ‘illnesses?’