An analytical model for residual-strain measurement based on the Scattering-type scanning near-field optical microscopy (s-SNOM) has been developed in this study. A-SNOM has a capability for inspection properties of materials in nanometer-scale and with resolution up to 10 nm. However, the scattering signals in s-SNOM are highly complex and contaminated by the background noise critically. To overcome the problem, we have proposed a mathematical model to improve the near-field signals by eliminating the background noise in heterodyne detection. According to the mathematical model, the study will discuss the signal in s-SNOM in detail, analyze the spectrum of measurements, and explore more methods to get better signal. Then, the mathematical model will be combined with other modified near-field ones to construct a novel near-field analytical model to fit the experimental data on phonon-polariton as possible. Based on the new analytical model, the dielectric constants of materials can be obtained more precisely, and the residual stress and strain relative to the variation of dielectric constants of SiC which most often utilized in micro- and nano-electromechanical system (MEMS and NEMS) can be determined more distinctly.