"Chapter 17—Jacob's Flight and Exile This chapter is based on Genesis 28 to 31 . Threatened with death by the wrath of Esau, Jacob went out from his father's home a fugitive; but he carried with him the father's blessing; Isaac had renewed to him the covenant promise, and had bidden him, as its inheritor, to seek a wife of his mother's family in Mesopotamia. Yet it was with a deeply troubled heart that Jacob set out on his lonely journey. With only his staff in his hand he must travel hundreds of miles through a country inhabited by wild, roving tribes. In his remorse and timidity he sought to avoid men, lest he should be traced by his angry brother. He feared that he had lost forever the blessing that God had purposed to give him; and Satan was at hand to press temptations upon him. PP 183"
"And Jacob went out from Beer–sheba, and went toward Haran. And he lighted upon a certain place, and tarried there all night, because the sun was set; and he took of the stones of that place, and put them for his pillows, and lay down in that place to sleep. And he dreamed, and behold a ladder set up on the earth, and the top of it reached to heaven: and behold the angels of God ascending and descending on it. And, behold, the Lord stood above it, and said, I am the Lord God of Abraham thy father, and the God of Isaac: the land whereon thou liest, to thee will I give it, and to thy seed; And thy seed shall be as the dust of the earth, and thou shalt spread abroad to the west, and to the east, and to the north, and to the south: and in thee and in thy seed shall all the families of the earth be blessed. And, behold, I am with thee, and will keep thee in all places whither thou goest, and will bring thee again into this land; for I will not leave thee, until I have done that which I have spoken to thee of."
The EGW passage directly summarizes and expands upon the narrative found in Genesis 28:10-15, detailing Jacob's journey, fears, and God's promise.
"The evening of the second day found him far away from his father's tents. He felt that he was an outcast, and he knew that all this trouble had been brought upon him by his own wrong course. The darkness of despair pressed upon his soul, and he hardly dared to pray. But he was so utterly lonely that he felt the need of protection from God as he had never felt it before. With weeping and deep humiliation he confessed his sin, and entreated for some evidence that he was not utterly forsaken. Still his burdened heart found no relief. He had lost all confidence in himself, and he feared that the God of his fathers had cast him off. PP 183.2"
"The sacrifices of God are a broken spirit: a broken and a contrite heart, O God, thou wilt not despise."
Both passages describe a state of brokenness and contrition before God. Jacob's despair and confession of sin in the EGW passage directly reflect the spirit of a broken and contrite heart that Psalm 51:17 describes as pleasing to God.
"But God did not forsake Jacob. His mercy was still extended to His erring, distrustful servant. The Lord compassionately revealed just what Jacob needed—a Saviour. He had sinned, but his heart was filled with gratitude as he saw revealed a way by which he could be restored to the favor of God. PP 183.3"
"For thy name’s sake, O Lord, pardon mine iniquity; for it is great."
Both passages deal with the theme of God's forgiveness of iniquity. The EGW passage speaks of God's mercy and providing a way for Jacob to be restored, while Psalm 25:11 is a direct plea for pardon. The connection is thematic and relevant.
Wearied with his journey, the wanderer lay down upon the ground, with a stone for his pillow. As he slept he beheld a ladder, bright and shining, whose base rested upon the earth, while the top reached to heaven. Upon this ladder angels were ascending and descending; above it was the Lord of glory, and from the heavens His voice was heard: “I am the Lord God of Abraham thy father, and the God of Isaac.” The land whereon he lay as an exile and fugitive was promised to him and to his posterity, with the assurance, “In thee and in thy seed shall all the families of the earth be blessed.” This promise had been given to Abraham and to Isaac, and now it was renewed to Jacob. Then in special regard to his present loneliness and distress, the words of comfort and encouragement were spoken: “Behold, I am with thee, and will keep thee in all places whither thou goest, and will bring thee again into this land; for I will not leave thee, until I have done that which I have spoken to thee of.” PP 1…
"And he dreamed, and behold a ladder set up on the earth, and the top of it reached to heaven: and behold the angels of God ascending and descending on it."
The EGW passage directly recounts and interprets the dream of Jacob's ladder as described in Genesis 28:12. It's a clear and explicit allusion.