Boyfriend can't comfort me when upset?

I've been with my boyfriend 4 years, we have generally been happy and he is quite supportive in other ways and helps out practically. However, when I am upset he can't seem to respond and comfort me.. rather than put his arm around me, he seems to put his guard up and move away. He quickly seems to become agitated and frustrated, he seems to get fixated on telling me why I’m wrong to feel how I do, which only makes me feel worse. For example, last night he happened upon me having a little cry since it was the anniversary of my dad's death. I told him that I was just reminiscing, and he responded that it didn't do any good to dwell on the past. I said to him I just needed to go through it and would like to be comforted, so he raised his voice and went on like "well I'm trying to comfort you, but you're being too MENTAL!" It's always the same, and usually results in him walking out and disappearing for a day. I rarely actually cry but because of his upsetting reactions in the past I find myself avoiding confiding in him in these times, which can make me feel quite isolated. He makes me feel like I’m stupid for having feelings. I've tried to talk to him about it, but it just seems to end the same way. Why is it we can be intimate in all other contexts but when I’m upset he can’t comfort me? How might I be able to get him to let his guard down and talk about this?
Boyfriend can't comfort me when upset?
Post Opinion