"While we cannot now comprehend the works and ways of God, we can discern His great love, which underlies all His dealings with men. He who lives near to Jesus will understand much of the mystery of godliness. He will recognize the mercy that administers reproof, that tests the character, and brings to light the purpose of the heart. DA 394.1"
"And we know that all things work together for good to them that love God, to them who are the called according to his purpose."
Both passages address the idea that God's actions, even when difficult to understand, are ultimately for the good of those who love Him. Romans 8:28 is a general statement of this principle, while EGW applies it to specific situations.
"and crucifixion, would be to them a most trying ordeal. Had no previous test been given, many who were actuated by merely selfish motives would have been connected with them. When their Lord was condemned in the judgment hall; when the multitude who had hailed Him as their king hissed at Him and reviled Him; when the jeering crowd cried, “Crucify Him!”—when their worldly ambitions were disappointed, these self-seeking ones would, by renouncing their allegiance to Jesus, have brought upon the disciples a bitter, heart-burdening sorrow, in addition to their grief and disappointment in the ruin of their fondest hopes. In that hour of darkness, the example of those who turned from Him might have carried others with them. But Jesus brought about this crisis while by His personal presence He could still strengthen the faith of His true followers. DA 394.2"
"But all this was done, that the scriptures of the prophets might be fulfilled. Then all the disciples forsook him, and fled."
Both passages discuss the disciples' abandonment of Jesus during his trial and crucifixion. While Matthew 26:56 simply states that they forsook him, EGW provides a possible explanation for why this happened and how Jesus prepared them for it.
"Compassionate Redeemer, who in the full knowledge of the doom that awaited Him, tenderly smoothed the way for the disciples, prepared them for their crowning trial, and strengthened them for the final test! DA 394.3"
"These things I have spoken unto you, that in me ye might have peace. In the world ye shall have tribulation: but be of good cheer; I have overcome the world."
Both passages address the idea of Jesus preparing his followers for trials and offering them strength and peace amidst tribulation. The EGW passage speaks of smoothing the way and strengthening for the final test, while John 16:33 speaks of peace in Jesus despite tribulation in the world.
"For we have not an high priest which cannot be touched with the feeling of our infirmities; but was in all points tempted like as we are, yet without sin."
Both passages highlight Jesus' compassion and understanding of human weakness. The EGW passage illustrates this compassion in the context of preparing the disciples for trials, while Hebrews 4:15 speaks of Jesus' ability to sympathize with our infirmities.