The f7/f2 bishop sacrifice is often seen in the Italian game. To avoid it...castle earlier. In the position you posted I woud get my rook onto the now open f-file and step the king back to g8.
He has given you a bishop for a pawn. You will lose tempo having to move the king again but he has gifted you an open f-file bearing down on his KBP
Now I know the King is to recapture here, but with the recapture castling is impossible of course, one of the King's protecting pawns are removed and the King is now vunerable. How should one continue so as to not fall prey to these sorts of early piece sacrifices to flush out the King?