Surface Mixed Potential Integral Equation (MPIE) formulations together with the Method of Moments (MoM) are widely used to solve electromagnetic problems. An accurate evaluation of the Green functions (GF) associated to the integral equation and of the coupling integrals needed to fill the MoM matrix are the cornerstone steps in the implementation of integral equation algorithms. This thesis is mainly focused on these two topics. The main intended application of our MPIE-MoM formulation is the analysis of enclosed structures, with the shield being materialized by rectangular cavities with perfect conducting (PEC) walls. GFs for rectangular cavities constitute a classic research topic, where there is still a lot of room for improvements. In this area, three main original results are presented in this thesis. Firstly, the exponential convergence of the modal series is ensured via a sophisticated coordinate permutation method. In second place, a study which allows setting the relationship between cavity resonances, excited modes and GF components' singularities, is fully developed. Finally, a novel hybrid method, to compute the GF static part is introduced. This method combines in a new original way both, the modal and image expansions of the cavity GFs. The discretization of the MPIE via the method of moments leads to a matrix equation. In the Galerkin version of the MoM, the matrix elements are given by four-dimensional integrals over source and observer surface domains of the GFs multiplied by some basis and test functions. These so-called coupling integrals invoke the integration of the GF singularity, which in the MPIE case is of the weak type (1/R). The accurate integration of this singularity is a very challenging topic, which has been tackled following many different strategies. Here, the closed analytical expressions of the 4D integral over rectangular domains of this singularity are presented. The problem related to the integration of the GF singularity on arbitrary shaped domains is solved through a hybrid numerical-analytical technique based on an original integral transformation and using by the first time double exponential (DE) numerical integration rules. The thesis concludes with several numerical examples and benchmarks of practical interest. They ascertain the validity of strategies, concepts and results of this thesis and they strongly hint to the development of future competitive computer tools.