Can impotent man has an orgasm?

I have a friend. He has ED. Viagra does not help and I wonder if man who cannot perform intercourse, can have orgasm somehow.
Is that possible?
Also, how difficult it is for a man to deal with ED? Do they get depressed easily because of that? Any experiences from anyone?

My boyfriend has ED due to several serious medical issues and I can still take care of him orally and he does climax.

His having ED did cause some problems for us previously because he thought that since he couldn't pleasure me through penetration that I wouldn't want him and eventually wander off to another man. It takes a very patient woman to deal with it as well, but I love him and I have no intentions of going anywhere.

I've only really had experience with part of this but yes, men can have an orgasm without being erect. I've seen it and was surprised. Granted...it was makeup sex/had been awhile/was intense and that might have a lot to do with the um, order of operations but...it happened.