Is it OK to masterbate after you something horrible?

I went through something bad 2 years ago and I started to masterbate just to keep my mind off it

Is this normal