"O Allah, there is none worthy of worship besides You. You are Pure, definitely I have oppressed my soul by sinning".
The Qur'an states that these words were recited when Yunus (A.S.) called upon Allah from the belly of the fish. Prophet Mohammad (S.A.W.) stated in a hadith that when any Muslim makes this dua via these words to Allah, then Allah surely accepts his duas.
It is stated in a hadith that
لَا حَوْلَ وَلَا قُوَّةَ إِلَّا بِاللَّهِ
is the medicine for 99 ailments, the least of which is depression.
(Baihaqi in Dawatul Kubra)
It means that these words are so beneficial and useful that big/great grievances, depression and sorrow are easily removed in its stride.
Abdullah bin Abbas (R.A.) narrates that Prophet Mohammad (S.A.W.) stated that if a person constantly makes "Astaghfar", then Allah removes every difficulty, frees him from every sorrow and makes a means for him to receive sustencance from places that he never thought of. (Mishkat from Ahmad)
When tired of life
Due to difficulty death is sought but one should never pray for death instead pray this: