Patchy hair loss due to the pulling out of hair from a compulsive behavior is trichotillomania.
Trichotillomania is also know as hair-pulling disorder, which is a mental disorder that involves recurrent, irresistible urges to pull hair from the scalp, eyebrows or other areas of the body, despite trying to stop. It is a body-focused repetitive disorder that is classified as an impulse control disorder.