Sayyiduna Abu Hurairah (may Allah be pleased with him) narrates that the Noble Prophet (peace and blessings be upon him) said: "None of you should say: O Allah! If You wish, forgive me. Rather, he should ask with determination, for there is no one who can compel Allah."
Related hadith on this topic