What would he feel first after that "eureka" moment?
You can easily find it out, if you see someone that is trying to break some altcoin. Or you can feel the same thing, if you try to solve security-related puzzles, like those ones:
http://www.wechall.net/ (in general, we had many people on forums, who thought that someone successfully broke ECDSA, hash functions, and things like that; they were all wrong, but their feelings were probably genuine).
What should they do if they prioritized the collective benefit?
In case of altcoins, the right way of doing that, is full disclosure on forums. Inform anyone and everyone about a particular weakness, and create a situation, where a statistical CPU owner can mount a successful attack. And then, if developers are wise, they will fix it immediately, and everyone will be safe and happy again. But if they will try to ignore that constructive criticism, then such altcoin should be burned, and all attackers can just destroy it. I saw that many times on bitcointalk, there are whole groups that collect a lot of Bitcoins, just by finding and destroying half-baked altcoins, which are full of security holes.
Keeping it secret, and never exploiting it?
This is bad idea. That means, someone else will just discover the same thing, and it will be worse, because the coin with that weakness will reach higher values, and more people will be harmed, when it will be destroyed in the future.
Publishing it, and making every mining infrastructure worth zero?
This is never the case. First, as vjudeu mentioned, it is not "secure vs broken" game. There is always some particular attack, and your defense will depend on that particular attack. Look at hardened SHA-1. Why it was created? Because of backward-compatibility. How it was created? Of course, based on the attack from 2017. If that would not happen, and if we would have a different attack in 2023, then hardened SHA-1 would use a completely different algorithm, designed specifically for that 2023 attack.
What would be the best approach for that person?
Exactly the same, as with every other security issue. First, write to the developers, inform them, give them some time to fix it. And if nothing will happen, then reveal everything publicly on forum. If it is still not sufficient, then demonstrate a practical attack on some test network, if there is any. And then, if messed up testnet is ignored, attack the mainnet. Because you revealed everything, and reached every previous stage of "inform and wait for the fix", you can publicly, and openly attack and destroy everything, to bring all of us into a world, that is safer, and resistant to this particular attack. Because if you won't, then that coin will grow further, and collapse in a worse way in the future.
Those steps in the middle can vary a little bit, but the general approach is simple: contact with developers, give them some time, and then publish it in a full disclosure model. You can find a list of previous BTC issues, and see, how exactly they were submitted in the past, how they evolved, which of them are solved, and which of them are still wide open, and wait for the future solution:
https://en.bitcoin.it/wiki/Common_Vulnerabilities_and_ExposuresEdit:
https://www.youtube.com/watch?v=4k1GcX1cqMg