Suddenly can't keep an erection?

My girlfriend and I used to go at it nearly every night. Then one day, we tried doggy-style. It didn't feel good, so I got soft. She got upset with me thereafter.

Several weeks later, she wanted to try doggy style, just as we were getting in the mood. I immediately went soft, and she got upset with me. Since then, I can't seem to keep an erection, just as we get into the mood, during any position.

I know that it is mostly a psychological issue, and I try not to think about keeping an erection, but this is really starting to get to me. What can I do to keep an erection?