Context. Measurements of the Sunyaev-Zel’dovich (hereafter SZ) effect distortion of the cosmic microwave background provide us with an independent method to derive the gas temperature of galaxy clusters. In merging galaxy clusters the gas distribution is inhomogeneous and, therefore, the method of temperature measuring based on the SZ effect should be more relevant than that based on an X-ray emission analysis. Aims. We study a method for measuring the gas temperature in merging clusters by means of the SZ effect. Methods. Our calculations of intensity maps of the SZ effect include relativistic corrections considered within the framework of the Wright formalism and utilize a cosmological numerical simulation of a merging gal...