Aims. Measurements of the Sunyaev-Zel'dovich (hereafter SZ) effect distortion of the cosmic microwave background provide methods to derive the gas pressure and temperature of galaxy clusters. Here we study the ability of SZ effect observations to derive the electron distribution function (DF) in massive galaxy clusters. Methods. Our calculations of the SZ effect include relativistic corrections considered within the framework of the Wright formalism and use a decomposition technique of electron DFs into Fourier series. Using multi-frequency measurements of the SZ effect, we find the solution of a linear system of equations that is used to derive the Fourier coefficients; we further analyze different frequency samples to decrease uncertainties in Fourier coefficient estimations. Results. We propose a method to derive DFs of electrons using SZ multi-frequency observations of massive galaxy clusters. We found that the best frequency sample to derive an electron DF includes high frequencies nu = 375, 600, 700, 857 GHz. We show that it is possible to distinguish a Juttner DF from a Maxwell-Bolzman DF as well as from a Juttner DF with the second electron population by means of SZ observations for the best frequency sample if the precision of SZ intensity measurements is less than 0.1%. We demonstrate by means of 3D hydrodynamic numerical simulations of a hot merging galaxy cluster that the morphologies of SZ intensity maps are different for frequencies nu = 375, 600, 700, 857 GHz. We stress that measurements of SZ intensities at these frequencies are a promising tool for studying electron distribution functions in galaxy clusters.