Technically those are not habits, but effects of anxiety. In order to fix your problem you should try to concentrate on things other than the thing that makes you anxious. Try chewing gum or something.
You to stop these habits? Good. It take perseverance.
Try taking deep breathes. I typically like to just close my eyes and count (slowly) to five while breathing slowly.