The link between biodiversity and ecosystem function can depend on environmental conditions. This contingency can impede our ability to predict how biodiversity‐ecosystem function (BEF) relationships will respond to future environmental change, causing a clear need to explore the processes underlying shifts in BEF relationships across large spatial scales and broad environmental gradients. We compiled a dataset on five functional traits (maximum height, wood density, specific leaf area [SLA], seed size, and xylem vulnerability to embolism [P50]), covering 78%–90% of the tree species in the National Forest Inventory from Italy, to test (i) how a water limitation gradient shapes the functional composition and diversity of forests, (ii) how functional composition and diversity of trees relate to forest annual increment via mass ratio and complementarity effects, and (iii) how the relationship between functional diversity and annual increment varies between Mediterranean and temperate climate regions. Functional composition varied with water limitation; tree communities tended to have more conservative traits in sites with higher levels of water limitation. The response of functional diversity differed among traits and climatic regions but among temperate forest plots, we found a consistent increase of functional diversity with water limitation. Tree diversity was positively associated with annual increment of Italian forests through a combination of mass ratio and niche complementarity effects, but the relative importance of these effects depended on the trait and range of climate considered. Specifically, niche complementarity effects were more strongly associated with annual increment in the Mediterranean compared to temperate forests. Synthesis: Overall, our results suggest that biodiversity mediates forest annual increment under water‐limited conditions by promoting beneficial interactions between species and complementarity in resource use. Our work highlights the importance of conserving functional diversity for future forest management to maintain forest annual increment under the expected increase in intensity and frequency of drought.