I’ve been in three long-distance relationships (included one that lasted many years and ended in marriage) and have known lots of others in them, too.
Do not feel guilty about ending the relationship. Even if you are engaged, you are not bound to stay with someone who would like to marry you. If the goal of the relationship is marriage, and you realize you aren’t going to consent to marry the person, the relationship is over. Once you know the relationship is not going to end in marriage, you need to say so.
There are better and worse ways to do this, but not any that are guaranteed to be gentle. How “gentle” the news is depends almost entirely on whether he feels in a similar way. Get used to the idea that your boyfriend may not go quietly, no matter what you do. He may do desparate things to keep you from leaving, no matter what you do. (He may also share your conclusion, to an almost disappointing degree!)
Give your reasons, if you want to, but do not give reasons for your reasons.. The only reason you really need, though, is this: “We knew when we started this that long-distance relationships are very hard and that they usually don’t work. I have to admit this to you: ours didn’t work. It doesn’t need fixing. It just didn’t work. Maybe it would have worked in the same city, maybe we would have the same outcome, but that is a moot point. I’m sorry, but it’s over. I care about how you feel about it, of course I’m willing to listen to your reaction, but I’m not up for a discussion. I’m not going to change my mind. There is nothing that a discussion of that point is going to accomplish.”
If (maybe I should say when) your reasons are questioned, you need to say, “John, my reasons are not up for discussion. My decision is not up for discussion. We’ve had a relationship for a long time, you are a good guy, I still respect you, and you deserve to know from me when it is over. What I’m not going to do, though, is have a discussion over whether or not it is over. It is. I’m sorry. I never wanted to hurt you. But now that it is over, telling you that and letting us each move on in our own way is the only way to deal with it. There isn’t anything I can say that will make it any easier. I’m sorry it didn’t work out. I hope you find that someone you’re looking for. I wish you all the best.”
After that, I’m sorry, but you need to cut off communication on the topic. You might even say, “John, I don’t know if ‘just friends’ is even possible for people who were considering marriage–and if you think I would ever dream ‘living together’ did not mean ultimately mean marriage, think again–I don’t know. I think it would be better if we cut off communication for the time being.”
Also, remember that you can say “I’m sorry” in the sense that “I feel for you” or “I wish you didn’t have to go through this.” That is not the same as “I’m sorry, this is my fault, I am guilty.” The hurt of this is something you both hazarded. Unless you lied to him, you have nothing to feel guilty about.