From your OP two things stand out for me
he believes that he has ED just with me !!
If this is true, then you are not compatible and he has cheated (probably often for years, this is just the one time you have caught him) so end things.
he wants me to forgive him and that his only purpose was not to cheat on me but just to experience it with another woman to see if it’s still functioning or not he wants me to help him get through this
He is doing the "poor me, I'm a victim" act here. He says he only has this ED problem with you, but wants to waste years of your life having you trying hard to please him (the pick me dance) to get through the tough time he is having with his so-called health condition.
Truth is, you've found the real problem with his ED - he doesn't have it, he just hasn't bothered with you as he was too busy cheating.
Suddenly his sob story has been shot to pieces when you found out and his nice cosy home life is about to come to an end and there is a risk he'll have to do his own washing, cooking etc. and live on his own. So he's trying to convince you that somehow his cheating is caused by you (and unless you were standing there with a gun to his head, he is really is responsible for his own actions). It is just a ploy to get things to go back to the way they were. He wants his home comforts, you blaming yourself and trying hard to please him while he carries on cheating and exposing you to STIs etc because he likes it that way.
You don't need his permission for a divorce assuming you're in the UK. No need to ask him as you can make your own decisions.