When light illuminates the junction formed between a sharp metal tip and a sample, different mechanisms can contribute to the measured photoinduced force simultaneously. Of particular interest are the instantaneous force between the induced dipoles in the tip and in the sample, and the force related to thermal heating of the junction. A key difference between these 2 force mechanisms is their spectral behavior. The magnitude of the thermal response follows a dissipative (absorptive) Lorentzian line shape, which measures the heat exchange between light and matter, while the induced dipole response exhibits a dispersive spectrum and relates to the real part of the material polarizability. Because the 2 interactions are sometimes comparable in magnitude, the origin of the chemical selectivity in nanoscale spectroscopic imaging through force detection is often unclear. Here, we demonstrate theoretically and experimentally how the light illumination gives rise to the 2 kinds of photoinduced forces at the tip-sample junction in the midinfrared. We comprehensively address the origin of the spectroscopic forces by discussing cases where the 2 spectrally dependent forces are entwined. The analysis presented here provides a clear and quantitative interpretation of nanoscale chemical measurements of heterogeneous materials and sheds light on the nature of light-matter coupling in optomechanical force-based spectronanoscopy.