The king saw Elijah eliminate the prophets of Baal. He experienced the heavy rain that Elijah told him was coming. But, when Ahab reported all this to Jezebel, she didn't back down at all. Instead she sent threats to him, "So let what happened to those prophets happen to me if I don't kill you first."
Elijah, unlike Jezebel, knew when the situation was scary. When he heard the threat, he fled for his life.
Leaving his servant behind, Elijah went a day's journey into the wilderness. Sitting alone under a solitary broom tree, he prayed to the Lord to take his life.
I'm trying to imagine what changed for him--he had been willing to take on a challenge against the priests of Baal, then he had been willing to try to run away from the queen's threat, and how he has given up. Did he think that the Lord had accomplished all possible? Did he think that Jezebel was so much stronger than all the prophets put together that she could win a contest with the Lord? Or, was he just tired of running, of being in conflict?
Whatever the reason he had for giving up, the Lord wasn't ready for him to die. An angel came to Elijah, showed him food and water. The refreshments did not refresh him enough to get him back on his journey. The angel returned to him and gave him more encouragement.
Elijah was able to journey for forty days and forty nights coming to Mount Horeb where he spent the night in a cave.
Fear. Despair. Lethargy. Renewed energy. Wilderness trek. Sleep.
Then the word of the Lord came to him asking him what he was doing there.
His response sounds rather confrontational to me, "I've supported you, but nobody else is. They're trying to kill me."
Elijah feels very alone. He is still afraid.