Confused

Me and my boyfriend have been together almost 2 years. At first it was good and then it took a turn. He could not keep a hard one during sex. This has went on during our entire relationship. This then start having us to question things and gives us major anxiety about our relationship. Sometimes when I see him I just get this feeling of anxiety. I never felt like this in my life! He has struggled with anxiety before we dated. And this is now passing over to me. And bring me down. The biggest thing that causes my stress and anxiety is our sexual life. What should I do?