England team's managing director Paul Downton says Cook was contemplating resigning from his post last month during the second Test against Sri Lanka when his tactical decisions backfired and hurt the side badly.
The incident relates to fourth day of the Headingley Test when Cook's tactics allowed tail-ender Rangana Herath and Angelo Mathews to build a huge partnership and he himself go out cheaply later.
"He was very low that night and he went to his hotel room wondering, 'Do I really need this But he woke up the next morning and said 'I am in'," Downton said in an interview with BBC's Test Match Special.
"That was all I wanted to hear, that he was committed to this job."
After England's defeat against India at the Lord's Test, a few experts had called for Cook's resignation and some advised that he should take a break but the England skipper is now back among runs and his side is on the verge of series-win over India.