I also bite my nails and never really saw it as a problem. but it's obviously bothering you. Have you tried that disgusting stuff that you put on your nails? Might be worth getting some of that. Something I've found helpful (my wife hates me biting my nails), is picking a finger and making sure not to bite that one - you can bite the other 9 as much as you want but do not bite that one finger. Once you can do that, pick another finger and do the same. It's really difficult to go from biting your nails to completely not biting them. Another thing you could try is chewing gum, it might help with unconscious biting.
I don't have any advice for how to stop pulling out your hair but hopefully this post is helpful for stopping the nail biting. Good luck!