The problem of electromagnetic scattering by a three-dimensional dielectric object can be formulated in terms of a hypersingular integral equation, in which a grad-div operator acts on a vector potential. The vector potential is a spatial convolution of the free space Green's function and the contrast source over the domain of interest. A weak form of the integral equation for the relevant unknown quantity is obtained by testing it with appropriate testing functions. As next step, the vector potential is expanded in a sequence of the appropriate expansion functions and the grad-div operator is integrated analytically over the scattering object domain only. A weak form of the singular Green's function has been used by introducing its spherical mean. As a result, the spatial convolution can be carried out numerically using a trapezoidal integration rule. This method shows excellent numerical performance.