Beam quality is a core issue in the field of terahertz full-field imaging. In this paper, we present a terahertz spatial filter consisting of two mounted ellipsoidal silicon lenses, which have the same eccentricity but unequal size, and an opening aperture on a thin gold layer between the lenses. At the frequency of 2.52 THz, the beam transmissivity and Gaussicity of the filtering system is investigated by simulation. COMSOL Multiphysics is used to conduct two-dimensional simulation experiments, aiming to find the appropriate aperture size and gold layer thickness, depending on the wavelength of incident light wave and numerical aperture of the ellipsoidal silicon lens. The filtering system is capable of filtering the non-Gaussian beam to a nearly fundamental Gaussian beam, and achieves a high transmissivity. In terahertz full-field imaging, the system can not only obtain an imaging beam wtih uniform intensity distribution, but also reduce the beam energy loss caused by multiple surfaces. Besides, the lens system is applicable for a wide terahertz frequency range if the wavelength dependent part is properly scaled.