Clusters of galaxies are merging during the formation of large-scale structures in the Universe. Based on optical survey data, we identify a large sample of pre-mergers of galaxy clusters and merging subclusters in rich clusters. We find 39 382 partners within a velocity difference of 1500 km s$^{-1}$ and a projected separation of 5 $r_{500}$ around 33 126 main clusters, where $r_{500}$ is the radius of the main cluster. Based on the galaxy distribution inside rich clusters with more than 30 member galaxy candidates, we identify subclusters by modelling the smoothed optical distribution with a two-component profile, and a coupling factor is obtained for merging subclusters in 7845 clusters. In addition, we find 3446 post-collision mergers according to the deviations of brightest cluster galaxies from other member galaxies, most of which have been partially validated by using the Chandra and XMM–Newton X-ray images. Two new bullet-like clusters have been identified by using the optical and X-ray images. The large samples of merging clusters of galaxies presented here are important databases for studying the hierarchical structure formation, cluster evolution, and the physics of intergalactic medium.