Compulsion, to deal with stress, addiction, "just because", or to feel something/not feel something are just a few different reasons why people SI.
Trying to identify the trigger as to the thought to SI can lend a hand in determining the best way to deal with it.