Jesus endured His suffering on the cross by thinking about the joy His sacrifice would bring: humanity's salvation

Hebrews 12:2

Looking to Jesus, the author and perfecter of faith, who for the joy that was set before him endured the cross, despising its shame, and has sat down at the right hand of the throne of God.

from Jesus Is My Joy list