Perhaps the ultimate example of physical ordeals is self-mummification while alive (sokushinbutsu). Of course, the process ultimately causes death. Over the course of years, practitioners gradually eliminate body fat, reduce water in the body, and even consume lacquer tea to preserve their internal organs and help prevent decay of the body. Eventually they perish in underground chambers. If all goes well (sometimes their bodies decay despite all the agonizing preparation), three years later they are dug up, depressed in priestly robes, and put on display in their temple. Remarkably, all mummification takes place while alive, not after death, over the course of three 1000-day preparatory stages plus the final live entombment in the underground chamber. As you might expect, self-mummification is extremely uncommon, and there have been about twenty-five know successful mummifications between the 11th century and 1903.
As to the origin of this practice, there is a common suggestion that Shingon school founder Kukai brought this practice from Tang China as part of secret tantric practices he learned, and that were later lost in China.