“If only I had a…” — what? A desire to work under any adversity, remembering that creative work for an artist in any field is as essential as food or sleep. Happiness, mental health itself, depends on your continuing to work. You need it like a diabetic needs insulin, and you have a right to it. — Natalie Goldberg
Every time you get an urge to do something damaging, write about a character doing it instead.
Externalise.
Emotional / philosophical / thought issue to work out?
Psychodrama and emotional alchemy: write it down as a story, give points-of-view to characters.
Let them battle out.