Firstly, at 48m 20s, Francis proclaims to Wade:
I've cured you Wade. Now your mutated cells can heal anything.
Then, around the 50m 30s mark, we see Wade escape the torture chamber by lighting the oxygen on fire with the match previously obtained. After a short fight with Francis, we see Wade impaled almost through the heart with a large metal rod. Shortly after, as he rises from the ashes, we hear his voiceover saying:
I didn't just the cure to el cancer, I got the cure to el everything
After this, he goes looking for Francis in a white ski mask and jumper, where he gets shot a couple of times, turning nonchalantly toward the shooter. His attitude towards getting shot clearly suggests that he's aware of this outcome, and it doesn't bother him. Due to this, we can assume that he figures it out before this point, likely as he rose from the ashes of the burning building.
Potentially graphic picture below, if you're not ok with it