The Rambam in Hilchos Teshuva discusses the Lashon of Viduy – confession. He says say "Anah Hashem, Chatasi, Avisi, Pashati, Asiti Kach V’kach". Please Hashem, I have sinned, I have turned away, I have been perverse, I have done such and such.
In Tehillim (kapital Yud Gimmel), Dovid Hamelech asks "Ad Anah Hashem Tishcachayne…Ad Anah Tastir Es Panecha"? Until when Hashem will You forget me…until when Hashem will you hide Your face from me.
How are these two connected? If we read the words of Tehillim as a statement, we find the answer to Dovid Hamelech’s question. Until when will Hashem hide Himself from us, Ad Anah, until we say the words Anah Hashem, chatasi…, until we acknowledge the wrong we have done and ask for forgiveness. When we recite Vidduy and confess our sins, it will be then that Hashem will turn His face back to us and end Galus.