Pulling hair out when nervous

Has anyone ever had this problem? Should I go to the doctor to get anxiety meds? I don't really pull it out, I brush it way too much, then it feels really good when I catch  knots, and it comes out in clumps. Luckily, I have extremely thick hair. But eventually I will probably notice bald spots!🙁