John Boehner is in a real pickle. If he simply folds his cards, he ends up as a failed Speaker in history. If he stays the course, he may be seen in history as worse than a failed Speaker, as a fool with no spine. If he participates in finding some kind of "grand bargain" with the Senate and the President, he may cling to some credibility but he will have lost his ability to manage his far right membership.
He is in a box of his own making from which there really is no good exit.
He does have one possible option to consider, if he is clever, smart and realizes that he has little to lose.
He should IMMEDIATELY -without consulting his party--announce that he is resigning as Speaker and then with sufficient Republican moderate support, which there is, join with Democrats and end the impasse and provide interim leadership of the moderate portion of the Republican caucus.
Then the struggle for a new speaker will begin and he probably would have the best chance -under those circumstances- of being reelected Speaker again with a mandate to not be stubbornly doctrinaire but to make practical deals across party lines tailored to the country's great needs, because he would control the swing votes.
Result: he might go down in history as a courageous, clever leader who knew how to lead in difficult and strange circumstances.
Not only would that outcome serve him personally, it would serve all Americans, and he would go from being hated and despised to heroic status.