When Jesus says it is blessed to be persecuted, he isn't referring to bringing on persecution in your own righteousness. That is simply being a hypocrite or being obnoxious. He says blessed are those who are willing to align themselves with me even at the cost of their own status in this world. Therefore, even in the face of persecution the follower of Jesus can rejoice because he knows his identity in Jesus is secure.