How to stop a bad habit ??

I'm not gonna lie i have a bad habit of picking at my skin or hair for example I pick my scabs and pull on my split ends so the dead ends break off but I try to stop but fail I get so annoyed when I catch myself doing it. Anyone know how to stop a bad habit?