A theory is presented for calculating the spin wave response of a three-dimensional damped magnetic system to an external excitation, in the frequency domain. The equation of motion, written in the Hamiltonian formalism, is discretized within a finite-element method, and the corresponding large system of equations is first linearized and then solved with well-established techniques of linear algebra, leading directly to the spectral response. This approach is therefore particularly suitable for interpreting the results of all-electric microwave measurements of magnonic crystals. The response of a three-dimensional structure, composed of a portion of a square array of circular dots placed in close proximity of a magnetic substrate, is then investigated. A prominent, narrow feature with a large rejection ratio is observed in the spin wave transmission spectrum, making this structure useful as a narrowband notch filter.