Does it matter? You do feel pain whether it's your imagination or not. Knowing the truth either way won't change what you are actually experiencing. What is an illusion, if you are really interested, is the way people live. That you can do something about. Just because others think their riches mean something or their beauty mean something does not mean that you have to believe it. They are all playing roles. Those that are caught up in the illusion of their role of mother, father, actress, drunk, doctor etc are insane. You can choose to be sane and know before you leave your house that you are entering a stage to perform an act. Or you can choose to be insane and put on your costume and accept what you see as reality.
It's the nerves through your body that causes pain. It is not an illusion, it's all the human body and how it works
its real buddy