12:87
يَا بَنِيَّ اذْهَبُواْ فَتَحَسَّسُواْ مِن يُوسُفَ وَأَخِيهِ وَلاَ تَيْأَسُواْ مِن رَّوْحِ اللّهِ إِنَّهُ لاَ يَيْأَسُ مِن رَّوْحِ اللّهِ إِلاَّ الْقَوْمُ الْكَافِرُونَ
"O my sons! go ye and enquire about Joseph and his brother, and never give up hope of Allah's Soothing Mercy: truly no one despairs of Allah's Soothing Mercy, except those who have no faith."
15:55
قَالُواْ بَشَّرْنَاكَ بِالْحَقِّ فَلاَ تَكُن مِّنَ الْقَانِطِينَ
They said: "We give thee glad tidings in truth: be not then in despair!"
17:83
وَإِذَا أَنْعَمْنَا عَلَى الإِنسَانِ أَعْرَضَ وَنَأَى بِجَانِبِهِ وَإِذَا مَسَّهُ الشَّرُّ كَانَ يَؤُوساً
Yet when We bestow Our favours on man, he turns away and becomes remote on his side (instead of coming to Us), and when evil seizes him he gives himself up to despair!
39:53
قُلْ يَا عِبَادِيَ الَّذِينَ أَسْرَفُوا عَلَى أَنفُسِهِمْ لَا تَقْنَطُوا مِن رَّحْمَةِ اللَّهِ إِنَّ اللَّهَ يَغْفِرُ الذُّنُوبَ جَمِيعاً إِنَّهُ هُوَ الْغَفُورُ الرَّحِيمُ
Say: "O my Servants who have transgressed against their souls! Despair not of the Mercy of Allah: for Allah forgives all sins: for He is Oft-Forgiving, Most Merciful.