Perfectionism is a personality trait that can be harmful when taken to extremes. While not considered a mental illness itself, it is a common factor in many mental disorders, particularly those based on compulsive thoughts and behaviors, like obsessive-compulsive disorder (OCD) and obsessive-compulsive personality disorder (OCPD).