Can I be denied life insurance because of a previous stay in a mental health facility or taking anti-depressives over 2 years ago?

Yes. Of course you can. You present a much, much greater than normal risk of premature death than another person of your age and sex, and thus many insurance companies will not take that level of risk on, even at a multiple of normal premium.

With a life insurance insurance policy, the company is betting a large face amount that you will live, while you are betting a small premium that you will die. Recent hospitalization is regarded as a major risk factor. The insurance companies -- rightly or wrongly -- are concerned that a person recently discharged (and 2 years is often considered recent) may relapse, or go off medications, and commit suicide or engage in other life threatening behavior.

After a sufficient period of stability that reluctance goes away, and each of the many companies has its own timetable and underwriting criteria. Even now another company may issue a policy -- and they are far more likely to do so if you want "permanent" insurance, such as whole life or universal life, than "term" -- often at a "rating" which means far higher than normal premiums.