Ever since the pioneering work of Ihlenburg and Babuška for the one-dimensional Helmholtz equation (1995, Comput. Math. Appl., 30, 9–37), a lot of pre-asymptotic analyses, including dispersion and pollution analyses, have been carried out for finite element methods (FEMs) for the Helmholtz equation, but no rigorous pre-asymptotic error analysis of the FEM for the Helmholtz equation in two and three dimensions has been done yet. This paper addresses pre-asymptotic stability and error estimates of some continuous interior penalty finite element methods (CIP-FEM) and the FEM using piecewise linear polynomials for the Helmholtz equation in two and three dimensions. The CIP-FEM, which was first proposed by Douglas and Dupont for elliptic and parabolic problems in the 1970s and then successfully applied to convection-dominated problems as a stabilization technique, modifies the bilinear form of the FEM by adding a least squares term penalizing the jump of the gradient of the discrete solution at mesh interfaces, while the penalty parameters are chosen as complex numbers here instead of real numbers as usual. In this paper, it is proved that if the penalty parameter is a pure imaginary number i γ with 0 < γ ≤ C, then the CIP-FEM is stable (hence well posed) without any mesh constraint. Moreover, the error of the CIP-FEM in the H1 norm is bounded by C1kh + C2k3h2 when k3h2 ≤ C0 and by C1kh + C2/γ when k3h2>C0 and kh≤C3, where k is the wave number, h is the mesh size, and the C's are some positive constants independent of k, h and γ. By taking γ → 0+ in the CIP-FEM it is shown that if k3h2 ≤ C0, then the FEM attains a unique solution and satisfies the error estimate C1kh + C2k3h2 in the H1 norm. Previous analytical results for the classical linear FEM in higher dimensions require the assumption that k2h is small, but it is too strict for a medium or high wave number. Optimal order L2-error estimates are also derived. Numerical results are provided to verify the theoretical findings and illustrate the performance of the two methods. In particular, it is shown that the pollution effect may be greatly reduced by tuning the penalty parameters in the CIP-FEM. The theoretical and numerical results reveal that the CIP-FEM has advantages over the FEM and is worthy of being investigated further. The pre-asymptotic error analysis of the hp version of the CIP-FEM and the FEM is studied in Part II. [ABSTRACT FROM PUBLISHER]