Defending champions Spain went down 2-1 to Croatia, who sealed top spot in Group D in the process, on Tuesday.
De Gea was criticised after Ivan Perisic's 87th-minute winner, which saw the Manchester United goalkeeper beaten at his near post after a slight deflection.
But following a wave of negative comments directed at the 25-year-old, De Gea says the criticism only motivates him to become better.
"The only ones who are defeated are those who lose hope," he wrote on Twitter.
"Thanks to the critics, you motivate me. To keep fighting!"
Spain will play Group E winners Italy in the round of 16 in Paris on 27 June.