The question was asked concerning an individual who on a fast day mistakenly took some food to eat, and immediately after reciting the Beracha remembered that he is fasting. Should he take a bite of the food so that his Beracha does not become a Beracha Le'vatala (a "wasted" Beracha, which one is forbidden to recite), or should he simply put down the food and continue fasting?
This issue is debated by the Halachic authorities. The Chid"a (Rabbi Chayim Yosef David Azulai, Israel, 1724-1806), in his work Birkei Yosef (568:1), cites from the work Nechpa Ba'kesef that in such a situation one should taste a bit of the food so that the Beracha will not be a Beracha Le'vatala. Numerous other authorities, however, including the work Erech Ha'shulchan, the Maharsham (Rabbi Shalom Mordechai Schwadron, Poland, 1835-1911) and the Shevet Sofer (Rabbi Simcha Bunim Sofer, Hungary, late 19th century), disagreed, and held that one should not eat in this case, even after he recited a Beracha.
Chacham Bentzion Abba Shaul (Jerusalem, 1924-1998), in his work Or Le'tziyon (vol. 3, 31:5), rules that in such a situation one should not taste the food, and should simply recite "Baruch Shem Kevod Malchuto Le'olam Va'ed" and continue fasting. By contrast, Chacham Ovadia Yosef, in his work Yabi'a Omer (vol. 2, Yoreh Dei'a section, 5:6-8), writes that one should taste a small amount of food in order that his Beracha not become a Beracha Le'vatala. He should then continue fasting after tasting the morsel of food. It should be noted that one who tastes a small amount of food (less than a Ke'zayit) on a fast day may continue fasting and even recite the "Anenu" paragraph added to the Amida service during Mincha (as mentioned in the work Zera Emet 3:62).
Summary: If one remembered that it was a fast day after he recited the Beracha over some food, he should taste a small amount of the food so that his Beracha does not become a "wasted" Beracha. He should then continue fasting as usual, and he may recite "Anenu" during Mincha.