Powerful method to evaluate the mass gaps of free-particle quantum critical systems