there are product made specifically to taste bad enough to make people not want to bite their nails. any pharmacy should have some. i wouldn't recommend habanero sauce, what if you happened to touch your eyes...
you could try to find something else to bite. pencils are good, i've even bit some in two. you can gnaw much harder on them as well. if you always keep something to bite on and a small pair of scissors near you, it might help you stop, since it gives yo no more excuses to bite your nails.
best way to stop doing something is to never do it again. then you just have to remember what you decided on every time you unconsciously get very close to starting the bad habit again. not easy, but i've found pencils very good to chew really hard on whenever it got frustrating that i already denied myself the possibility of chewing on my nails.
pens should be avoided since they just break and become useless.