There has been a lot of speculation on the "incident" and whether or not the hydrogen bomb is detonated by the Losties. This being the forum for speculation, I thought I would weigh in with my own theories on the incident:
1) The H-Bomb is detonated
2) The electromagnetic properties of the island prevent the death of all
3) The Swan needs to be completed because of #2
Some more details...
1) To jump into reality a bit, this is a television show with a limited amount of story telling time per week. Since the show is nearing its finale, I do not believe the writers/creators have the time to waste on introducing plot devices that do not have a significant impact on the plot. They have spent a lot of time this season on the bomb, 2 episodes by my count. Therefore, they need it to do "something" to justify the screen time.
2) I read a little bit on H-Bombs and the type of explosion that they create. The long and short of it is that they use nuclear fusion to generate the reaction that produces the explosion. According to Wikipedia, nuclear fusion is "process by which multiple like-charged atomic nuclei join together to form a heavier nucleus". Interestingly enough, the article goes on to discuss that iron and nickel have the strongest nuclei (which would produce the largest reaction, i.e. explosion). Also interesting is that both iron and nickel are ferromagnetic (attracted to metal via magnetism). Which leads me to...
3) The the electromagnetism of the island is able to contain the power of the explosion by "holding" together the nuclei of the elements in the bomb but the energy needed to do so is so great that it needs to be discharged periodically. The Swan is built over this source of discharge and the numbers are born.
As an aside, the energy release by the Swam most probably carries some form of radiation that would lead to the sterility of the island inhabitants.