The Rebbe relates: "I heard from chassidim of Poland that when the Rebbe of Modzitz fell ill and traveled to Berlin for medical advice, the doctors said he would need to have surgery. However, since he was extremely weak, they were unsure if he could survive the pain of surgery, [since in those days there was no anesthesia]. When the Rebbe heard this, he said they should wait until he would sing a melody and enter into a trance. As is known, he had great melodic power, and from his deep concentration in the delight of the melody he would not feel what was happening. Then they would be able to perform the surgery without concern. So it was. They waited until he entered into a melodic trance, they performed the surgery, and all went well.
"We see from this that even in our generation it is possible for a Jew to meditate on a pleasant experience to the extent that he does not feel what is happening to and around him."
Likkutei Sichos, vol. 27, p. 275