The gamma ray background from large scale structure formation