Bunyan struggled with doubts regarding his soul for many years. In Grace Abounding to the Chief of Sinners, he goes into great detail about his struggles. It is almost discouraging to read. He wondered whether he had committed the unpardonable sin. He was haunted by particular verses of Scripture. He states the temptations to forsake Christ in vivid detail. I read wondering where Bunyan was going with all of this. I asked myself, "Is all this really necessary?"
Then, in paragraph 229 everything changed.
I'll let Bunyan tell you what happened:
"One day as I was passing into the field . . . this sentence fell upon my soul. Thy righteousness is in heaven. And methought, withal, I saw with the eyes of my soul Jesus Christ at God's right hand; there, I say, was my righteousness; so that wherever I was, or whatever I was doing, God could not say of me, he wants [lacks] my righteousness, for that was just before [in front of] him. I also saw, moreover, that it was not my good frame of heart that made my righteousness better, nor yet my bad frame that made my righteousness worse, for my righteousness was Jesus Christ himself, "The same yesterday, today and, and forever" (Hebrews 13:8).
Now did my chains fall off my legs indeed. I was loosed from my afflictions and irons; my temptations also fled away; so that from that time those dreadful scriptures of God left off to trouble me; now went I also home rejoicing for the grace and love of God."
Works, pp. 35-36.