We studied the use of Talbot pattern illumination in scanning optical microscopy (SOM). Unlike conventional illumination spots used in SOM, the focal spots in Talbot pattern are more complicated and do not have a simple Gaussian intensity distribution. To find out the resolution of SOM using Talbot pattern, we characterized the evolution of the full-width-at-half-maximum spot size of the Talbot focal spots by computer simulation. We then simulated the SOM imaging under Talbot pattern illumination using the razor blade and the U.S. Air Force target as the sample objects, and compared the results with those performed with Gaussian spots as illumination. Using several foci searching algorithms, the optimal focal distances were found to be shorter than the theoretical Talbot distances. The simulation results were consistent with the experiment results published previously. We then provide a practical guidance for searching for optimal focal distances in the SOM based on these studies.