put an elastic band around your wrist and pull it when you have the urge to harm yourself or read a book to try and distract you or go for a long walk or a hot bubble bath xx
for me personally I find cleaning my saddle a very relaxing distraction that ones a bit random I know, also walking or other forms of exercise. Holding my dog or waxing my legs.