Anas said that the Prophet (s.a.w) said: "Allah will say: 'Remove from the Fire whoever remembered Me one day, or feared Me while in a state of sinning".
This hadith also teaches us about the importance of repentance and seeking forgiveness for our sins. Even if it seems like there is no hope left for us after making a mistake or committing a sin, this hadith reminds us that as long as we turn back to God with sincerity then He will forgive our transgressions. We should never give up on ourselves but instead strive to be better people by turning back to God whenever possible.