Agricultural expansion has markedly reduced forests and reconfigured landscapes. These changes incur a well-known detrimental impact on the biodiversity of local forest patches, but the effects on species persistence at broader geographic scales are widely debated. We investigated how regional diversity is affected by habitat loss, fragmentation, and cattle grazing, and how species respond to deforestation both locally and regionally. We also investigated how the heterogeneity in species distribution (beta-diversity) alters species responses across scales. The vast majority of the 251 ant species found in our study were negatively affected by both habitat loss and cattle at local forest patches, drastically reducing diversity at these patches compared to pristine forests. Despite local declines in diversity, however, heavily fragmented landscapes could still retain most species due to the high heterogeneity in species distribution. Beta-diversity is the main component of regional diversity, and this component is maximized when remnant primary habitats in a landscape are spread across vast areas. Although preserving local diversity may be important for the adequate functioning of the ecosystem, our results indicate that the maintenance of many small forest patches in a landscape can buffer regional biodiversity against local species extinctions. Our results suggest that even small forest remnants in otherwise deforested landscapes can prevent most regional-scale species extirpations, and therefore also merit conservation efforts.