He is using you and playing you for a fool.
He cheats on his girlfriends/partners with you. He calls you up when he wants some. He will leave it months and months to call you and when he does, you end up sleeping with him.
Everything you have said, everytime you met up, every time you talked to him on the phone, you end up sleeping with him. It's a game to him. He's just stringing you along and has done for quite a long time now.
I'm sorry if it's harsh but it needs to be said. I know you are trying to break free from him and it's difficult because of the attachment you feel with him due to your long friendship (from your point of view) but you need to stop jumping when he calls.
You are clearly better than this by trying to stop this cycle, you just need a bit more time and determination. You are not something that can be picked up and played with when ever he feels like it, so stop making yourself available. You've lost contact with him before and you can again. Next time when he calls, ask who he got your number from, block him and give that person a telling off, they should not be giving your number out without your permission. You deserve so much more than him, it's obvious in your opening post and unlike him, you do actually have a moral compass. You knew it wasn't right sleeping with him when he already had someone and I can see that you are not happy with yourself for doing that. This is not the person you are, he's making you into something you are not. He's dragging you down to his level, are you happy for him to do that?
Do you want to be his plaything or are you worth more than that? What are you going to do about it?
Get up, block him, get on with your fabulous life and never lower yourself to his level again. You deserve someone who will not mess you around like this, but you won't find him if you are messing around with this idiot. Delete, block, move on.