Pain is a perception not a stimulus. It is not a product of your mind in the sense that you voluntarily create it. The perception of pain is controlled by your central nervous system which is much more than your mind.
Central pain sensitization is a feature of chronic mesh pain. It is not a figment of your immagination. It is an actual physical change of the pain neural pathways in your brain, your amygdala, your brainstem and your spinal cord. The pain signals coming from your mesh are what triggered these changes in your central nervous system. Removing mesh removes the primary cause of your central pain sensitization and your pain can go away if the central pain sensitization renormalizes. This can take a long time and in some patients it never reverses. There are new medications coming out now that can treat central pain sensitization.