Came across this article on nytimes.com:
Frustrated Strivers in Pakistan Turn to Jihad
The article describes a very well established scenario, describing why and how, certain youth from Pakistan's lower-middle class adopt such a violent way of life.
Coming back to the subject, from the article:
"Like Mr. Kundi, many came of age in the 1990s, when jihad was state policy — aimed at challenging Indian control in Kashmir — and jihadi groups recruited openly in universities. Under the influence of Al Qaeda, their energies have been redirected and turned inward, against Pakistan’s own government and people.
That shift has fractured long-established militant networks, which were once supported by the state, producing a patchwork of new associations that are fluid and defy easy categorization."
It is crystal-clear from above, that it was their State's policy, to an extent that it was made a part of teaching in schools, all in order to instigate violence against India on the pretext of the Kashmir issue. And now the policy has backfired and its working against the same State, and they are clueless. Once long-established militant network has fractured and given rise to fluid individuals: who are easily swayed by a certain oppression - in this case, the failure to succeed in this world, even after putting in tireless efforts.
I couldn't come up with an idiom in English that would mean the same. But its close to this one: "as you sow, you shall reap." This is referring to the topic.