But he himself went a day's journey into the wilderness and came and sat down under a broom tree. And he asked that he might die, saying, “It is enough; now, O YHVH, take away my life, for I am no better than my fathers.”
1 Kings 19:4

Elijah apparently expected his ministry to accomplish a final or sweeping revival in Israel. When his moment of triumph turned into more time spent hiding in caves from wicked rulers, he thought he had failed. It wasn't the first time that God had to remind Elijah that there was more happening in God's plan than what one man can see. God knows what we need and what will sustain us in even the most hopeless circumstances. Keep following, keep obeying, and he will see you through.