This is a fascinating discussion, because I consider myself very risk-averse, but I have a different gut reaction. We know that bias and stigma are real, for any kind of disclosed disability or health condition, but particularly mental health diagnoses, even among trained individuals who "should know better." The board has little to lose by denying you a license (other than the possibility of a lawsuit, which many people won't have the resources/time to pursue), whereas the applicant has a huge amount to lose if they can't get licensed. Of course, there is the non-zero risk that you eventually get sued, and if it did come out that you didn't include such information on the application, that would be a huge issue. But there's also the question of how likely is it that something like "mild/moderate depression or adjustment/anxiety issues and prior treatment" (per Harry3990) would actually be discoverable by the board, opposing counsel, etc. It would take a fairly major malpractice suit to get a judge to order the release of a psychologist's personal medical records (say from past insurance providers), and even in that case, mental health treatment in the US is so fragmented that lots of care isn't tracked in a centralized way.
Of course, if someone gets licensed and then does actually behave unethically as a result of untreated/unmanaged mental health issues, and this impacts a client, then the odds that the psychologist's mental health history and records will be investigated goes up quite a bit! But I think we'd agree that, if you were actually practicing in a way that was impairing patient care due to illness, that would be something that should actually be caught by regulatory boards, as that's part of their job.
Anyway, I'm certainly not arguing that people should just lie on their licensure applications, just that there are real costs and risks associated with each option, of varying probabilities, to consider. And regardless, I'll still stand by my assertion that it's better to get the help you need now and to actually succeed in your graduate training to become a psychologist, than to continue to suffer (which could very well have a much more serious impact on your ability to ultimately practice, insofar as depression impacts learning, academic performance, work performance, etc). If necessary, years down the road when you are applying for licensure, you can consult a lawyer in your state familiar with professional licensure regulations in that jurisdiction prior to submitting your application.