Late to this party and so glad it was resolved. I just wanted to add one little scrap of food for thought to chew on, hopefully with the idea of avoiding hurt feelings in the future...
I pod just about every comment on this thread, but I noticed what I paid attention to (my own life-experience bias at work here) was the pattern of approach/isolation that played out when there was a problem.
IMHO, it is important to be aware of how each of you respond to a problem. It's kind of a "fight or flight" thing, where in this case it seems as if you flee at first so as to avoid a fight you do not want to have. BF pursued you to ask what was wrong - I hope you can see what a good thing that is!
You see, for me, the worst thing someone can do when I am upset is leave me alone unless I expressly tell them that I need space. When someone is upset, others instinct is usually either to give space or comfort/try to help fix. If I need someone to listen and my SO is giving me my space because I'm upset, I end up feeling like he doesn't care. If I need my space because I'm too overwhelmed to talk and my SO is hovering around and trying to get me to open up then I feel overwhelmed and like he doesn't respect my boundaries and once again doesn't care. Nine times out of ten I want to be approached, but it is my responsibility to communicate that to my SO, as it is my responsibility to make it clear that tenth time that I need him to back off instead.
It is very important to be able to be aware (during a conflict) of what you want and why, and be able to tell the person you are dealing with what you want from them.
I guess this is my long and fancy way of saying communication is important.
Glad you were able to recognize where things went wrong and work things out DM. Sounds like your BF is trying pretty hard despite his occasional cluelessness, and is willing to work with you and listen to you as you try and exorcise the negative patterns laid down by your ex. Good luck!