It depends one’s metaphorical definition of “illusion.” If you mean by the word that no experience is permanent, then yes, pain is an illusion. That is an extreme if not absurd definition of "illusion" because then everything is an illusion. Or, if you mean that the pain is not caused by what you assume, that also works to a degree. Yet if, as the schools of Buddhism to which I refer, one means that it is not real, you aren’t actually experiencing what you are experiencing, then that as an erroneous absurdity.
What is called “mindfulness meditation” is not in the foundational schools of Buddhist thought. It is a New Age reinterpretation of Buddhist meditative practices which seeks, yes, to increase awareness, but to remove the illusion that one is a self having experiences in the world.