Once you beat the main story of the game, go to the desert resort and Professor Juniper will give you the ragecandybar. Walk up and interact with one of the blue statues (Professor Juniper will instruct you to do this), and you will be thrown into a battle with a lvl 35 Darmanitan. Catch this darmanitan, and it's ability will be Zen Mode. In-Battle, when this darmanitan's HP is 50% or lower, it will activate Zen mode.