As you mentioned this all happened all of a sudden but let me tell you this not strange and not even happened with you only. But the most important and hopeful thing is there in your case that you have realized that you are doing something wrong or you did mistake. This is the most important factor in case faith (Imaan). And I’m sure that this will help you a lot inshallah to bring you in your previous state .Hidayat and guidance is in the authority of Almighty Allah and He says in the Holy Quran:
وَلَقَدۡ خَلَقۡنَا ٱلۡإِنسَـٰنَ وَنَعۡلَمُ مَا تُوَسۡوِسُ بِهِۦ نَفۡسُهُ ۥۖ وَنَحۡنُ أَقۡرَبُ إِلَيۡهِ مِنۡ حَبۡلِ ٱلۡوَرِيد
And indeed We have created man, and We know whatever thoughts his inner self develops, and We are closer to him than (his) jugular vein, [50:16]
It means He has not left you on your own, because when we human being start committing mistakes or sin and have no inner voice and regret it means now we are away from Allah’s mercy and Shaitan has over powered upon us.
First of all you have to remember and find out the exact what happened to you that you suddenly turned out from your Islamic faith? Was there any doubt in your mind unsolved or was there any action you anybody which broke your heart and you felt that you have lost everything? About your Job and its mode of work? Any friend of you that influenced you much? Your family’s behavior related to you and the environment of house was different? Because in this world two things work always in each and every issue doesn’t matter that is small of big that is “Cause and Effect”. Without any reason it is impossible a person get suddenly changed in his/her life.
Therefore first of all you have to sort out your own personal doubts. Who are you? What is your aim of life? Why do we need Religion? What Religion is really? What would happen if we do not follow the religion? What is the freedom of and what are its boundaries. Do we have any boundary in our life or being a Human we are totally free?
You ask these question to yourself ponder on it then if you need any further help i'll answer