It’s worth noting that Neatorama had this sound advice on atempting anything like this:
Unlike conventional modern “magic,” what was involved in the underwater breathhold was not special effects or hidden technology. Instead, Blaine prepared using a combination of hypoxic tent training to increase his hematocrit, preloading with 100% oxygen, meditation to decrease his oxygen consumption, and hyperventilation to delay his hypercapnic response.
As a useful reference point, his 17-minute breathhold time is almost the same length as this 20-minute TED talk. It’s also worth noting here as an addendum that the hyperventilation (“purging”) he describes should not be attempted by amateurs to increase underwater breathhold time while swimming or diving. The technique does allow a longer breathhold, but does not provide additional oxygen, so novices can become disoriented from hypoxia and drown.