Fatir 35:8
أَفَمَن زُيِّنَ لَهُۥ سُوٓءُ عَمَلِهِۦ فَرَءَاهُ حَسَنًا ۖ فَإِنَّ ٱللَّهَ يُضِلُّ مَن يَشَآءُ وَيَهْدِى مَن يَشَآءُ ۖ فَلَا تَذْهَبْ نَفْسُكَ عَلَيْهِمْ حَسَرَٰتٍ ۚ إِنَّ ٱللَّهَ عَلِيمٌۢ بِمَا يَصْنَعُونَ
Afaman zuyyina lahu soo-o AAamalihi faraahuhasanan fa-inna Allaha yudillu man yashaowayahdee man yashao fala tathhab nafsukaAAalayhim hasaratin inna Allaha AAaleemunbima yasnaAAoon
Then is one to whom the evil of his deed has been made attractive so he considers it good [like one rightly guided]? For indeed, Allāh sends astray whom He wills and guides whom He wills. So do not let yourself perish over them in regret. Indeed, Allāh is Knowing of what they do.
Then, can the one whose evil deed is so much adorned for him that he deems it really good (be equal to the one who differentiates between good and evil)? The fact, therefore, is that Allah lets go astray whomsoever He wills, and leads to the right path whomsoever He wills. So, (O Prophet,) let not your soul collapse in grief for them. Surely Allah knows well what they are doing.