Multiscale analysis of brittle failure in heterogeneous materials