"Bid the tempted one look not to circumstances, to the weakness of self, or to the power of temptation, but to the power of God's word. All its strength is ours. “Thy word,” says the psalmist, “have I hid in mine heart, that I might not sin against Thee.” “By the word of Thy lips I have kept me from the paths of the destroyer.” Psalm 119:11 ; 17:4 . MH 181.2"
"Thy word have I hid in mine heart, that I might not sin against thee."
The EGW passage directly quotes Psalm 119:11, making it an explicit allusion.
"Talk courage to the people; lift them up to God in prayer. Many who have been overcome by temptation are humiliated by their failures, and they feel that it is in vain for them to approach unto God; but this thought is of the enemy's suggestion. When they have sinned, and feel that they cannot pray, tell them that it is then the time to pray. Ashamed they may be, and deeply humbled; but as they confess their sins, He who is faithful and just will forgive their sins and cleanse them from all unrighteousness. MH 181.3"
"If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness."
The EGW passage alludes to 1 John 1:9, stating "as they confess their sins, He who is faithful and just will forgive their sins and cleanse them from all unrighteousness," which is a clear reference to the promise in 1 John 1:9.
"Let us therefore come boldly unto the throne of grace, that we may obtain mercy, and find grace to help in time of need."
Both passages encourage approaching God even when feeling unworthy due to sin. Hebrews 4:16 speaks of coming boldly to the throne of grace, while EGW speaks of confessing sins and receiving forgiveness. The core message of finding grace and help in times of need is present in both.