I can understand your shock; I too have grieved over the unexpected deaths of men and women who greatly influenced my life and taught me much about God. Don't forget that Jesus was only in His early 30s when He died on the cross.
Why did God take your pastor, when he apparently could have had years of fruitful ministry ahead of him? I wish I knew the answer, but I don't, and neither do you. What I do know is that we see only a small part of the picture, but God sees the whole, and He can be trusted to do what is right. I know it's hard for us to trust God in situations like this and believe He's still in control -- but He is. The Bible says, "The Lord works out everything for his own ends" (Proverbs 16:4).
Thank God for this man's faithfulness over the years, and ask God to help you continue to learn from his example (as well as his teaching and preaching). In addition, as you seek a new pastor, pray that God will lead you to the person of His choice. Your new pastor won't be exactly like your former pastor, nor should you expect this. But seek someone who truly loves God and His Word, and will help your congregation grow closer to Christ.
In addition, may each member of your congregation discover what it means to serve Christ while you are without a pastor. The Bible says, "Serve one another in love" (Galatians 5:13).