As more and more distributed photovoltaics (PVs) are installed in distribution networks, the dynamic characteristics of PVs affect the operation of the bulk power system. Accurate simulation of PV characteristics is essential for the needs of power system transient security and stability analysis. However, because of the large number of distributed PVs, detailed modeling of each PV significantly increases the electromechanical transient simulation time. The equivalent study of distribution networks with distributed PVs is needed to improve simulation efficiency. However, existing equivalent methods of PVs mainly focus on centralized PVs but are unsuitable for distributed PVs with significantly different dynamic characteristics. To improve simulation efficiency, this paper proposes an equivalent method of the distribution network with distributed PVs for electromechanical transient study based on user-defined (UD) modeling. Firstly, the equivalent structure of the distribution network is established. The static equivalent of the transmission lines and the dynamic equivalent model of loads are carried out. Then, a UD model based on PSASP is established for the dynamic equivalent of the distributed PVs. Compared with the current PV models in simulation software, the UD model has multiple sets of parameters for the equivalent of distributed PVs with different dynamic characteristics. Finally, the particle swarm optimization (PSO) algorithm is used to obtain the parameters of the equivalent PV. The effectiveness of the proposed method is verified under an example of a distribution network with PVs in PSASP.