What does "I'd be the luckiest guy alive if that did it for me" mean?

In the movie As Good As It Gets, there is this dialogue:

Simon Bishop: Thank you, Melvin. You... overwhelm me.
[pauses]
Simon Bishop: I love you.
Melvin Udall: I tell you, buddy... I'd be the luckiest guy alive if that did it for me.

What does I'd be the luckiest guy alive if that did it for me mean ?


Solution 1:

If that did it for me means If that were my kind of thing, i.e., if I were homosexual like you. In other words, Melvin wants to tell Simon that he would be very lucky if he could be a couple with him, which Melvin can't because he is straight.

Solution 2:

During the movie, Melvin is very neurotic and has a tendency to either say the wrong thing, or say something that is just off. He has said offensive things to Simon in the past.

In this scene, near the end, Melvin, by saying I tell you buddy, I'd be the luckiest guy alive if that did it for me, does three things. He calls Simon buddy, acknowledging he is his friend. He would be lucky, because the gay character is a great person. He loves him also, just not in a romantic way, but can't quite say this. And by comparing himself to a hypothetical gay person, without any offensive comments, it shows deep down he has no real prejudice.