n recent decades, the field of physical mathematics has undergone remarkable developments, leading to many powerful results. Among them is the discovery of connections between quantum spectral problems on the one hand, and supersymmetric gauge theory or topological string theory on the other. In this talk I will review some aspects of this interplay and present a new connection between N = 2 supersymmetric gauge theories in four dimensions and operator theory. In particular, I will focus on one example of an integral operator related to Painlevé equations and whose spectral traces compute correlation functions of the 2d Ising model. Adopting the approach of Tracy and Widom, I will provide an explicit expression for its eigenfunctions via an O(2) matrix model. I will then show that these eigenfunctions are computed by surface defects in SU(2) super Yang-Mills in the topological string phase of the ?-background. This result also gives a strong coupling expression for such defects, which resums the instanton expansion. Even though I will focus on one concrete example, we expect these results to hold for a larger class of operators arising in the context of isomonodromic deformation equations. This is based on joint work with M. François.