BF can't stay hard

I'm in a predicament. My boyfriend can't stay hard long enough to even put condom on/enter me. This has been going on for 6 months and it seems to be getting worse. I've been really encouraging and open to trying things to help, but he's now psyched himself out. He's a great guy and loves me, but sex is an important part of a relationship and the situation is wearing on me....