If one has to complain, it is wise to bear strongly in mind and make sure that Allah is the top-most hearer of one's complaint, whilst a person fulfils the worldly necessities and means within Allah's obedience.
That way, one is saved from shirk (attempting to achieve from creation through that which angers Allah) and kufr (absolute denial of Allah).
Nobody can say for sure that Allah has forgiven, although they can have an idea of the situation and hope for grace, so it is best to turn to Allah as soon as one finds they made a mistake or recognized the gravity of their crime.
Remorse is the best tool to shut down bad wiring in the brain, but then correct thought and positive action in Allah's way are required in order to rewire the circuits properly so the Boss doesn't come and find it all in a mess.
He hates bad jobs, but also invalid excuses about why it wasn't fixed.
11. How many were the populations We utterly destroyed because of their iniquities, setting up in their places other peoples?
12. Yet, when they felt Our Punishment (coming), behold, they (tried to) flee from it.
13. Flee not, but return to the good things of this life which were given you, and to your homes in order that ye may be called to account.
14. They said: "Ah! woe to us! We were indeed wrong-doers!"
15. And that cry of theirs ceased not, till We made them as a field that is mown, as ashes silent and quenched.
16. Not for (idle) sport did We create the heavens and the earth and all that is between!
17. If it had been Our wish to take (just) a pastime, We should surely have taken it from the things nearest to Us, if We would do (such a thing)!
18. Nay, We hurl the Truth against falsehood, and it knocks out its brain, and behold, falsehood doth perish! Ah! woe be to you for the (false) things ye ascribe (to Us).
From Quran, Chapter 21