Catalysis of the reaction: (R)-pantolactone + NADP+ = 2-dehydropantolactone + NADPH + H+. The reaction is B-specific (i.e. the pro-S hydrogen is transferred from the 4-position of reduced nicotinamide cofactor) with respect to NADP+.
Source:EC:1.1.1.214