How to deal with f2/f7 bishop sacs?

I feel like I often get caught off guard by gambit openings where they sac the bishop for a check and 5 moves later my positions all messed up and im down material.