Narrated 'Aisha, the wife of the Prophet (sallallaahu alayhi wa sallam) I asked Allaah's Messenger about the plague. He told me that it was a punishment sent by Allaah on whom He wished, and Allaah made it a source of mercy for the believers for if one at the time of the spread of a plague epidemic stays in this country patiently hoping for Allaah's Reward and believing that nothing will befall him except what Allaah has written for him, he will get a reward similar to that of a martyr.
The plague is a punishment from Allaah.
It is a mercy for the believers.
If there is a plague epidemic in the country where you live, you have a chance to earn a reward similar to that of a martyr.
To get the reward similar to a martyr you have to
Stay in the country
Know that only what Allaah has written will befall you
Have the intention for a Reward from Allaah
Doing the above will give you the reward similar to that of a martyr.