From a fantastic little book, The Bookends of the Christian Life by Jerry Bridges and Bob Bevington:
[A] little-known seventeenth-century Puritan, Thomas Wilcox . . . wrote Honey Out of the Rock, one of the most helpful essays we've found on dealing with persistent guilt. We've updated into modern language a series of Wilcox's instructions for dealing with persistent guilt:
Shift your focus away from your sin and onto Christ: don't persist in looking upon sin; look upon Christ instead, and don't look away from him for a moment. When we see our guilt, if we don't see Christ in the scene, away with it! In all our storms of conscience, we must look at Christ exclusively and continually.
Shift your focus to Christ, our mediator. If we're so discouraged we cannot pray, then we must see Christ praying for us (Romans 8:34), using his influence with the Father on our behalf. What better news could we ever want than to know Jesus Christ -- the Son of God, co-creator of the Universe -- is addressing the Father on our behalf?
Shift your focus to Christ crucified, risen, and ascended. When guilt persists, remember where Jesus is and where he's been. He has been upon the cross, where he spoiled all that can ruin us. He's now upon the throne of heaven, as our advocate and mediator. His state in glory doesn't make him neglectful or scornful of the guilty sinners he died to redeem. He has the same heart now in heaven as he had upon the cross.
Shift your focus to the glory of Christ. If guilt still persists, remember that he pardons for his own name's sake (Isaiah 43:25; Ezekiel 36:22; 1 John 2:12), because in pardoning us he'll make us living monuments of the glory of the grace he purchased. It's Christ's own happiness to pardon, so he does. By embracing this truth, even the most desperate sinner's conscience can rest absolutely assured.
Shift your focus off of self-condemnation. When our conscience relentlessly condemns us, remember that Christ will have the last word. He is judge of the living and the dead (1 Peter 4:5) and only he can pronounce the final sentence. Christ is the judge -- not us or our conscience. So never for a moment dare to take the judge's place by proclaiming irreparable guilt when he proclaims hope, grace, and pardon. If we think our sin is too great to be pardoned, remember that Christ doesn't agree.
Shift your focus off of self-contempt. If we're focused on hating ourselves, realize that we're focused on ourselves and not on him. Self-contempt is a subtle form of self-centeredness, which is the opposite of Christ-centeredness. Unless our self-contempt makes us look more at the righteousness of Christ and the cross of Christ and less at ourselves, the whole endeavor leads to death. Let our sin break our hearts but not our hope in the gospel.