The Messenger of Allah ﷺ related that a man once said, "By Allah, Allah will never forgive so-and-so."Allah Almighty then said, "Who is this who swears by Me that I will not forgive so-and-so? Indeed, I have forgiven so-and-so and rendered your own deeds void," or as he said.
حدثنا سويد بن سعيد عن معتمر بن سليمان عن أبيه حدثنا أبو عمران الجوني
أن رسول الله ﷺ حدث أن رجلا قال والله لا يغفر الله لفلان وإن الله تعالى قال من ذا الذي يتألى علي أن لا أغفر لفلان فإني قد غفرت لفلان وأحبطت عملك أو كما قال