Thank you for staying online,
I am sorry to hear about your problem, and I can understand how uncomfortable you may be feeling, but hopefully, we can resolve this.
The symptoms you have described of having a problem in getting the hardness of the penis can be due to various causes.
Its most common causes are- stress, depression and anxiety, cigarette smoking, nerve or spinal cord damage, low testosterone levels, certain medications.
Stress and anxiety are some of the most common and most probable causes of erectile dysfunction.
Most likely, your erectile dysfunction is because of psychological causes. It includes stress, anxiety, depression, guilt, Low self-esteem, nerves – especially about performing, relationship problems - especially if you’re no longer keen on your partner.
Certain feelings can interfere with normal sexual function, including feeling nervous about or self-conscious about sex; feeling stressed either at home or work.
The treatment depends on the cause. It includes Oral medications like Sildenafil (Viagra), Tadalafil (Cialis) and lifestyle improvements (for example, quitting smoking(if you do so) and exercising more), and testosterone therapy.
My best advice is to please make an appointment with your doctor/psychologist to confirm the exact underlying cause, and then treatment will be done accordingly.
I hope I have been able to clarify the situation for you and helped in resolving your query.
I am available to answer any follow-up questions that you may have, so please feel free to ask.