You don’t say how you came to realize that your motives weren’t right, but I’m thankful you did, because God doesn’t bless us when we do things out of pride or only to bring glory to ourselves. God has said, “I will not yield my glory to another” (Isaiah 42:8).
But no matter how you came to understand this, I believe God was actually working behind the scenes to help you understand this about yourself. One of the tasks of the Holy Spirit is to convict us of sin, and this is what has happened to you. But why did He do this for you? He did it not only so you’d realize your motives have been wrong, but so you would repent and put Christ (and not yourself) at the center of your life.
Instead of resigning, therefore, my prayer is that you will humble yourself before God, confessing your pride, and asking Him to cleanse you and help you begin to serve Christ — and Christ alone. God has given you the gift of leadership; otherwise you wouldn’t have been elected to this office. Now ask Him to help you use that gift for His glory.
The key is to let Jesus Christ be your example. He was God, but He humbled Himself for our sake, even dying on the cross for our sins. The Bible says, “In your relationships with one another, have the same mindset as Christ Jesus: Who… made himself nothing by taking the very nature of a servant” (Philippians 2:5-7).