The Euler-Maclaurin summation formula is generalized to a modified form by expanding the periodic Bernoulli polynomials as its Fourier series and taking cuts, which includes both the Euler-Maclaurin summation formula and the Poission summation formula as special cases. By making use of the modified formula, a numerical summation method is obtained and the error can be controlled. The modified formula is also generalized from one dimention to two dimentions. Examples of its applications in statistical physics are also discussed.