Major depressive disorder (MDD) affects around 350 million people worldwide, however the underlying genetic basis remains largely unknown. In this study, we took into account that MDD is a gene-environment disorder in which stress is a critical component, and used whole genome screening of functional variants to investigate the ‘missing heritability’ in MDD. GWAS analyses using single- and multi-locus linear mixed-effect models were performed in a Los Angeles Mexican-American cohort (196 controls, 203 MDD) and in a replication European-Ancestry cohort (499 controls, 473 MDD). Our analyses took into consideration the stress levels in the control populations. The Mexican-American controls, comprised primarily of recent immigrants, had high levels of stress due to acculturation issues and the European-Ancestry controls with high stress levels were given higher weights in our analysis. We identified 44 common and rare functional variants associated with mild to moderate MDD in the Mexican-American cohort (genome-wide FDR<0.05), and their pathway analysis revealed that the three top overrepresented GO processes were innate immune response, glutamate receptor signalling and detection of chemical stimulus in smell sensory perception. Rare variant analysis replicated the PHF21B gene in the ethnically unrelated European-Ancestry cohort. The TRPM2 gene, previously implicated in mood disorders, may also be considered replicated by our analyses. Whole genome sequencing analyses of a subset of the cohorts revealed that European-Ancestry individuals have a significantly reduced (50%) number of single nucleotide variants compared to Mexican-American individuals and for this reason the role of rare variants may vary across populations. PHF21b variants contribute significantly to differences in the levels of expression of this gene in several brain areas, including the hippocampus. Furthermore, using an animal model of stress, we found that Phf21b hippocampal gene expression is significantly decreased in animals resilient to chronic restraint stress, when compared to non-chronically stressed animals. Together, our results reveal that including stress level data enables the identification of novel rare functional variants associated with MDD.