The main objective of the present work is to find an approximate analytical solution for the nonlinear differential equation of the vibro-impact oscillator under the influence of the electromagnetic actuation near the primary resonance. The trigger of vibro-impact regime is due to Hertzian contact. The optimal auxiliary functions method (OAFM) is utilized to give an analytical approximate solution of the problem. The influences of static normal load and electromagnetic actuation near the primary resonance are completely studied. The main novelties of the proposed procedure are the presence of some new adequate auxiliary functions, the introduction of the convergence-control parameters, the original construction of the initial and of the first iteration, and the freedom to choose the method for determining the optimal values of the convergence-control parameters. All these led to an explicit and accurate analytical solution, which is another novelty proposed in the paper. This technique is very accurate, simple, effective, and easy to apply using only the first iteration. A second objective was to perform an analysis of stability of the model using the multiple scales method and the eigenvalues of the Jacobian matrix.