Notice what Hebrews is teaching us. Not just the danger of neglecting the heart, but also the means of protecting it. "exhort one another." This is not generic encouragement or try-harder coaching. This is gospel application to one another's hearts. This is pressing Scripture into each others' lives. Of all of the "holy means" we have to keep the heart none is more important than Scripture.
We don't talk about "Scripture" being useful today like we used to. We use the word "gospel" a lot without much further direction. But merely saying "gospel" is not enough. In fact the degree to which anyone can be "gospel-centered" is largely determined by his Bible-fluency. I'm not talking about getting the 10 commandments in the right order, or knowing what was created on which day in Genesis 1. I mean that keeping the heart (guarding against the danger of sin, but also cultivating love for and communion with the Lord Jesus Christ--see John 15) is a gospel issue, and the gospel can only be known in God's word.
So, as we think about this practically, "How can I keep the heart?", the word Scripture will be central. Below are three Scripture-driven ways of keeping the heart.
Let the Word of God Expose You
For the word of God is living and active, sharper than any two-edged sword, piercing to the division of soul and of spirit, of joints and of marrow, and discerning the thoughts and intentions of the heart. And no creature is hidden from his sight, but all are naked and exposed to the eyes of him to whom we must give account. (Hebrews 4:12-13, ESV)
If you can read the Bible without coming away feeling the conviction of God over your sin and your desperate need for daily grace you are reading without receiving. Whether we are reading about the character and work of God or his laws and commands, we should be struck with both his holiness and his our unholiness, his purity and our impurity, his provision and our great need.
In other words part of keeping your heart is seeing, owning, and repenting of your sin daily. You will not guard your heart against the danger of sin if you do not recognize both its presence and its damaging influence. Look to God's word to expose the darkness in you, and this will lead you to the next, and vitally connected, way of keeping the heart.
Let The Word of God Rescue You
"Therefore put away all filthiness and rampant wickedness and receive with meekness the implanted word, which is able to save your souls." (James 1:21, ESV)
Of course Jesus saves. By his life, death, and resurrection we who believe are counted as fully righteous, we are fully forgiven, and we are being progressively transformed into his image. But the knowledge of Jesus only comes by the word of God, and in that God's word rescues us.
To say that we must let the word of God rescue us means that we must daily believe on this Christ that has been revealed who alone atones for our sins, conquers our enemies, and puts us at peace with our Maker. We must read God's word with the aim of deepening our dependence on Christ while distancing ourselves from pseudo-saviors like self, morality, success, or knowledge.
We really keep our hearts when we look to the One who promises to keep our souls (Jn. 17:15; Ps. 121:7).
Let the Word of God Guide You
Your word is a lamp to my feet and a light to my path. (Psalm 119:105)
The word of God reveals his will (law) to us and consequently exposes our guilt. In doing this it shows us our need for redemption, and by the work of the Spirit through the ministry of the word we believe in Christ who rescues us from our guilt. But if this is all we do with God's law we have stopped short of God's intention.
God hasn't told us what he desires of us only to show us we can't do it. In Jesus Christ we are rescued from our lawlessness unto a life of godliness. "[Jesus Christ] gave himself for us to redeem us from all lawlessness and to purify for himself a people for his own possession who are zealous for good works." (Titus 2:14) And he has given us his word that we would be "equipped for every good work." (2 Tim. 3:16, 17)
Our hope before God is not our performance, but the righteousness of God imputed to us through faith in Jesus (Phil 3:8, 9). And yet there a safe keeping of the heart to be found in allowing God's word to guide us in the "normative" use of God's law. His word, his law, remains a rule for Godly living and by his Spirit he empowers us to do what he commands. (Ez. 36:26, 27)
One way we keep our hearts is by letting the word of God guide us, or lead us, in godliness.