My other half has some Ed after investigation it was decided that it must be psychological. We found that medication doesn't really help but and experience similar to the problem shared by the OP he struggles to maintain an erection for penetration...... But after trial and error we have found a cock ring that helped the situation, we tried many different types and eventually found Durex Pleasure Ring if we place it onto him when he initially becomes hard and then take a little more time simulating him we can then engaged in full intercourse.
Ok so it's not what was required with previous partners but it quickly become a normal part of our intimacy, it's different but not something to be worried or scared of.
Have fun