Are you in counseling? Can you call a counselor when you have the urge to do this?
You need to try to find a way to break this pattern, even if you want to do it. Either call someone - go out - write - draw - something!
Do you live alone or with someone? If with someone can they put a password block on the computer so that you only go on when someone is there with you?
Trying to think of ideas for you.....
Tranquility