One of the main themes of the Beatitudes is to define righteousness for followers of Christ and to show them how to please God. The word "blessed" means to have the favor of God.
If you want to please God, live by the Beatitudes. If you live by the Beatitudes you will be righteous and if you live righteously in an evil world, you will be persecuted.
So, are we then to conclude that God is pleased when you are persecuted?
No, God takes no pleasure in your persecution but He does take pleasure in your faithfulness to remain righteous in the face of intense pressure and pain.
Remaining righteous in the midst of persecution proves that you love pleasing God more than you like pleasing yourself. That pleases God.
God was pleased when Daniel purposed in his heart not to defile himself by being unrighteous under the pressure to conform to the King's decrees. Daniel was faithful all the way to the lion's den and he pleased God.
We know that God shut the mouths of the lions but Daniel didn't know that in advance, he just knew he was determined to remain righteous.
God was pleased when the three Hebrew children declared they would not bow to the image of the king even if it meant they would burn in his fiery furnace.
When the image came past and the trumpets sounded and everyone bowed low, they stood tall. They were fully prepared to perish in the furnace but their righteousness pleased God so much He sent His Son into the flames to deliver them.
So, while God takes no pleasure in your persecution He is pleased when you prove that you love Him and His righteousness more than you love your own life.
The pressure and pain of persecution is God's proving ground for those committed to pleasing Him.
Will you please Him as the prophets of old did?
Will you purpose to live righteously today no matter how much it hurts?