Okay, well, the first red flag (to me) was when he sent you a message thru your friend saying he's "sad." Really manipulative, because he knows you're vulnerable. Now the texting. He's sucking you back in. You're having the longings and feelings he's wanting you to have. I hate to say this, but unless you cease all communication, i.e., block his texts and/or calls and avoid people who may give you his "messages," as in "he's sad," he'll soon have you back, if he doesn't already. You will also have to avoid going places and being with mutual friends. You will have to focus on how badly he treated you, and how hurt you were, rather than missing him.
It IS like an addiction. I know; been there, done that. Now, looking back, I consider myself SO lucky to have
escaped being a doormat to a user.