He seems like a huge game player. There are people that feel powerful just because they have the upper hand by causing confusion. A guy serious about a relationship does not send all these mixed signals. You have to entertain the possibility that he is just wasting your time. If he can't admit to his own faults then he isn't ready to be in a relationship. A relationship is about two people and their needs. He seems to be only interested in his own needs. That self centered approach to life isn't conducive to a healthy relationship.
He is playing games for his own reasons. We don't know what they are. But is obvious that he likes to keep you confused. That doesn't promote honesty. This may be just a way to give his ego a boost or maybe he is scared but that doesn't mean to draw you into this by pulling you in and then letting you go.
I would move on.
He seems cold when he wants to be. Childhood problems doesn't justify teating othres badly. It is good that you saw his tender side but that is not permission to treat you badly. He may be protecting himself. You can't live for others. He has to bridge the gap between protecting himself and playing with your feelings. I would be scared for the nexxt time he can't cope and goes off somewhere for awhile. Whether he is confused or just into games it is still going to be painful. The decisiont to deal with it is up to you.
You did nothing wrong! You are right about everything. You can't continue to let him come in and out or he will do just that. You have to have boundaries. The problem he has none. He is doing what I call enjoying the chase. The chase is the enjoyable and the relationship is not what he wants. His goal is to get you emotional again. Anyone that does this so frequently is all about feeling important or special when someone stops what they are doing and lets him come back. The fact that he crosses your boundaries frequently proves my point. If he doesn't respect you he doesn't love you. What he says or tells others is all words. You have to depend instead on how he acts. If actions say that he doesn't love you than that speaks louder than words. As long as you let him keep interrupting your life he will. He isn't going to be a consistent source of support. Find the strength to let him go = for good.