I want to stop thinking about him but I can't.
I'm sorry, why do you want to stop thinking about him?
So that the pain will stop.
It's understandable that you feel hurt when your feelings are not reciprocated. You should avoid investing emotions into a situation that shows unrequited love. Instead, focus on yourself and your goals so that you can move forward.
I feel like cutting myself so that I don't think about him.
You shouldn't hurt yourself over someone. You should try to get out there and find someone to love that will love you back.