Yeah, I think you totally did the right thing. He, at least, is not ready for a committed relationship, let alone a marriage. And there's nothing wrong with that. Better that he confessed his feelings now than after the wedding.
As for whether you should stick around, that's up to you - but there's a lot of potential for you to be very badly hurt if you do. From the sound of your post, you are ready to settle down and he is not yet ready to give up single life. Wait if you want, but know that you might be waiting for a long time.
Personally, I would not. I would not want to be with someone who treats 'forever' so casually that he is willing to get engaged before thinking it out. These feelings should have come out before the engagement.
This isn't just cold feet. This is him seriously not being ready for marriage. I don't know about you, but I expect my marriage to be permanent. Clearly, this man doesn't share that view, if he was willing to get engaged when he felt the way he's told you. If he felt that marriage is forever, why would he consider marriage if he's happier without you? I would not want to be with someone who doesn't share my feelings on the seriousness of marriage. This would be a dealbreaker for me.
I can understand a little nervousness after getting engaged, but if someone proposed to me (or said yes if I asked) when he felt this way, I'd be done with the relationship. It would be clear to me that I take marriage more seriously than he does - and that's not something that's likely to change over time. He might get over wanting to be single again, but that won't change the fact that he seriously considered marriage when he was TOTALLY not ready. If you believe that your marriage will last until death, I wouldn't marry a man who was willing to jump into it so unprepared. That's a recipe for failure.
In any case, I'm very sorry that your relationship has ended and I hope that you have the strength to do the right thing.
Vice President and Guardian of the Toilet Brush of POOP: People Offended by Offended People