Well obviously you are not that friend. Closet cases are in the closet, they aren't looking to be open and honest with anyone, including themselves - especially themselves. You can't change that, you can't fix it. He'll talk or he won't on his own schedule - he may never come out, you may be completely mistaken, he may burst from the closet in flame and glitter, none of which can you affect in any way.
What are you getting out of this? There is some reason you are focused on this, what is it?
Guys pursue the impossible usually because it's safe, they get to have the romance with none of the risk, of course it's not real, but it doesn't require facing the possibility of rejection either. Sometimes guys pursue the impossible to avoid dealing with themselves, guys will pursue the impossible to justify why they aren't pursuing something tangible.
Are you co-dependent? Are you trying to save him?
What are you getting out of this, because it's not getting laid, so what is your motivation to stay put and not just back burner this flaky, closeted mess of a guy, and go find one who will be seen in public with you?
You can be his friend at the gym without sacrificing your self respect - and that is exactly what you are giving up waiting for this guy to want you instead of putting yourself FIRST and looking for a guy who'll want you back.