What is the difference between personality disorder and other types of mental illness?
There may not be one: 


  it is impossible to conclude with confidence that personality disorders are, or are not, mental illnesses; there are ambiguities in the definitions and basic information about personality disorders is lacking.


https://www.ncbi.nlm.nih.gov/pubmed/11823318/

Mental illness in general isn’t about mood, either. Mood only covers mood disorders, but the DSM and ICD contain other conditions too: autism, schizophrenia, etc. 

Mental illnesses also have biological components, they’re not solely disorders of thought patterns formed over time.