What IM client do you use? I found it helpful to unfollow my H (rather than unfriend or block) on Facebook and then remove him from my list on gchat so I wouldn't obsess over knowing if he was online or what he was doing - if there's a way you can make it so you can't see his status, without going to the extreme of blocking him/him knowing you've removed him from your list, maybe that would help you in resisting the urge to contact him.
Me:30 H:29, no kids T:12, M:4 (when D was final) 12/13: "Don't think I want to be M anymore" 6/14: Separated (I move) 1/15: H filed for D 5/15: D final