you didn't answer that part of the question: Is the presence of anxiety and depression due to a lack of closeness/understanding to our Creator?
Not every depression is the result of disobedience. However, every disobedience to the Creator leads to depression.
God said: "And whoever turns away from My remembrance - indeed, they will have a depressed life, and We will gather them on the Day of Resurrection blind. They will say, 'My Lord, why have you raised me blind while I was [once] seeing?' God will say, 'Thus did Our signs come to you, and you forgot them; and thus will you this Day be forgotten.' And thus do We recompense those who transgressed and did not believe in the signs of their Lord. And the punishment of the Hereafter is more severe and more enduring." [20:124-126]
God said: "And whoever turns away from My remembrance - indeed, they will have a depressed life, and We will gather them on the Day of Resurrection blind. They will say, 'My Lord, why have you raised me blind while I was [once] seeing?' God will say, 'Thus did Our signs come to you, and you forgot them; and thus will you this Day be forgotten.' And thus do We recompense those who transgressed and did not believe in the signs of their Lord. And the punishment of the Hereafter is more severe and more enduring." [20:124-126]