The analytical formula for deuteron-nucleus microscopic optical potentials is derived using the mass operator method of Green function, and the nucleon density distributions of target nuclei are determined with the semiclassical variation (SCV) approach. These formula and density distributions are utilized ro evaluate the real and imaginary parts of 2D+40Ca,2D+60Zr and 2D+208Pb optical potentials at different energies. The potentials obtained in this way are fully selfconsistent and microscopic, since the same Skyrme interaction is employed in determining the nucleon density distributions of target nuclei and in clacula-ting the potentials.