Every pastor is a unique person with his own gifting and personality, strengths and weaknesses; but most pastors also have several things in common. Most of us battle insecurity. Too often we’re workaholics and perfectionists. We tend to obsess over what others think (though we tend to deny it, especially to other pastors). We battle discouragement. We don’t like Mondays.

And if we’ve been in the pastorate for long, we most likely have considered walking away and doing something else—anything else—with our lives. I once had a pastor friend who’d grown so depressed that he tried to talk his wife into helping him intentionally disqualify himself from ministry. By God’s grace, I was able to talk him out of that absurd notion.

As for me, there was one specific time when I wanted to walk away.

I had just finished the third year of my first full-time pastorate. That year had been hellish, to say the least. One Sunday morning a fellow elder, to my surprise, asked the congregation for a vote of confidence on my leadership. He called me a failed leader. The people didn’t cooperate, but my family watched the whole thing from the second row. It was the final straw that led to my resignation a few days later.

I vowed to my wife that I was done with ministry for good. How could a failed leader be called to shepherd God’s people?

But I did the only thing I could: I read the Psalms. I read 2 Corinthians so many times that I memorized much of it. And I prayed for hours every day. By God’s grace, I remain in pastoral ministry all these years later, but what does a pastor on the verge of leaving pray? Here are six things.

1. That God would help me take the long view.

Satan often uses emotions as weapons against us. This seems doubly true for pastors. I can’t tell you how many Mondays, especially during my early years as a pastor, I wondered if I would be better at something else. Perhaps my sermon had fallen flat, or a critic had unburdened himself to me at the door or in a post-church email.

If ministry has taught me anything, it’s the lesson Jesus taught in Mark 4:26–29: I am not in control, and nothing good happens overnight. Soon it became evident that I mustn’t make a rash decision to quit ministry based purely on emotion. Over time, God’s purpose would become clear. So I then moved onto number two.

2. For illuminating providences.

What were the facts telling me? Were other churches interested in bringing me on? Were there opportunities to preach as a guest in other pulpits? Were newer pastors still seeking my advice? The more I thought about leaving ministry, the more doors opened in each of these categories. After leaving my first church, I was preaching somewhere almost every weekend.

One group from my former church wanted to plant a church with me. It was not a good idea, but I hoped it was telling. Two other churches asked me to submit my resume for pastoral openings. Another called, interviewed, and within one week offered me the role of senior pastor. I wasn’t given much of a chance to think and pray it over, so I turned it down, but the opportunity helped to clarify things. I was praying God would show me what to do, and he was. Because he gave me a few illuminating providences, I was by no means done as a pastor.

3. That God would change my heart toward ministry.

I wanted to be drawn to another vocation. At one point, I nearly took a non-ministry job in my hometown. It paid well. I’d known my potential employer all my life. It would be safe—a shelter from the pouring rain of criticism, a fortress from the gawking eyes that seemed to watch eagerly for my downfall. I also considered returning to newspaper journalism, which had been my pre-ministry vocation.

But here was the rub: I still wanted to pastor. God wasn’t changing my desires. If anything, absence from the pastorate was making my heart grow fonder for it. To me, that was reason enough to continue to ask him for an open door.

4. That God would help me find my identity in Christ, not in pastoring.

I’ll admit that sometimes I wonder if my identity is bound up in being the man who leads the church and does most of the preaching. When I worked as a newspaper journalist, I pursued greatness in that field with every fiber of my being, often working 70 to 90 hours per week. If you’d have asked me who I was, I would have said, “I’m a journalist.” It sat at the core of my identity. As I’ve searched my heart in the years since, I believe it was an idol.

It’s easy to make good things, like pastoral ministry, into God-substitutes. Ask him, then, to examine your heart and help you to answer this question honestly: Would I be content if I never served as a pastor again and “merely” existed as an active and faithful member of a solid church? A mentor asked me this while I was working through whether to remain in ministry. Ever since, I’ve prayed God would enable me to cling to pastoral ministry loosely and cling to Christ tightly, finding my satisfaction and identity in him. Paid ministry makes a poor god.

5. For humility and sanctification.

Robert Murray M’Cheyne famously said, “The greatest need of my people is my personal holiness.” Over the years, I’ve tried imperfectly to make that a tireless pursuit—killing sin and praying for God to plant and grow the Spirit’s fruit in me. Particularly during times of doubt, I’ve asked God to use my circumstances to make me like Jesus, to make me holy. One of the most frightening verses in all of Scripture is Hebrews 12:14: “Strive for peace with everyone, and for the holiness without which no one will see the Lord.” Do you see why that’s frightening? Pursuing holiness is more fundamental and serious than the question “Am I really called to ministry?”

I’m convinced that seasons of affliction and doubt in ministry serve as opportunities for heightened growth and maturity. To paraphrase John Piper, I’ve asked God not to waste my suffering and doubt, but to make it a catalyst for raising up an abundant harvest of righteousness in me. Do we always know what God is doing when we suffer or doubt? No way. In fact, I don’t think we usually know what God is doing in or through us, because the Christian life is a race of faith (Heb. 12:1–2). But we can rest assured that he is working in 10,000 ways that our eyes cannot see.

6. For persevering grace.

It’s important, too, to pray for preserving grace. We often think of God’s grace simply in terms of salvation. But the God who saves us by grace also keeps us by grace. The entire book of Hebrews is a sermon on enduring grace.

The doctrine of the perseverance of the saints may also be understood as God’s preservation of the saints (Ps. 31:23). Write this over the door of your heart: “For you have need of endurance, so that when you have done the will of God you may receive what is promised” (Heb. 10:36). Pray every single day for fresh waves of grace to crash upon the shores of your life and ministry.

If you pastor for long, you’re going to doubt your calling. Don’t waste this opportunity for maturity. Let it drive you to your knees.

Editors’ note: This article originally appeared at The Gospel Coalition.