In this paper, a spatial image technique is used to efficiently calculate the mixed potential Green's functions associated with electric sources, when they are placed inside arbitrarily shaped cylindrical cavities. The technique is based on placing electric dipole images and charges outside the cavity region. Their strength and orientation are then calculated by imposing the appropriate boundary conditions for the fields at discrete points on the metallic wall. A method for the assessment of the potentials accuracy is proposed, and several optimization techniques are presented. Three cavities are analyzed to demonstrate the usefulness of the techniques. The cutoff frequencies and potentials patterns are compared to those obtained by a standard finite elements technique, showing excellent agreement. Finally, a band-pass filter based on coupled lines is analyzed, demonstrating the practical value of the technique.