You can stop by doing other activities when you get bored or nervous. Find some good books to read, call your friends for a good conversation, polish your nails a quirky coior, or cook an unusual meal for yourself.
Put chille pepper on your fingernails. Next time you bite it you will be choked. By the way, I stopped biting my fingernails in this way. . .
Good luck, buddy!