It's not really about the nails. The nails are just getting other shit taken out on them.
I had a FES class once with 38 females and 3 guys. We were talking about bad habits and one of the guys said he bit his nails. The professor asked if anyone had a suggestion about what he should do to stop. I raised my hand:
"Do your best to let them grow, and go get a manicure. You're not gonna wanna get your nails DIRTY, let alone bite them off." 38 chicks turned around w/ the "who said that?" look on their faces :chuckles:
All-in-all, it's nervous tension. Try do take deep breaths instead. That's how I quit smoking cigs. Deep breaths.