There is a tradition mentioned in various books that has tragically been experienced by many throughout Jewish history, that a person who intentionally gives up his life to sanctify God’s name does not suffer pain.
There is a shocking account of a conversation with a person who was being slowly burned alive, sanctifying God’s name.
He claimed throughout the conversation until he died that he felt nothing.
There is a similar account of the last public burning in Spain.
A Jew in hiding who had circumcised himself was arrested and sentenced to be burned.
At the time of his burning until his soul left him, he sang the words of Shema Yisrael (it is said that his singing left such an impression on the spectators that the government canceled future public burnings).
Rabbi Adin Steinsaltz