"And the children of Israel did not remember the LORD" (Judges 8:34). Why? Because they did not do kindness with the house of Jerubbaal [Gideon]. Thus: had they done kindness with the house of Jerubbaal, they would have remembered the LORD. Thus: whoever does kindness, it is as if he acknowledges all the miracles that the Holy One, blessed be He, performed from the day Israel went out of Egypt; and whoever does not do kindness, it is as if he denies [them].
Kindness to Gideon's House as Faith in God
Yalkut Shimoni on Nach 64:4
ולא זכרו בני ישראל את ה', למה שלא עשו חסד עם בית ירובעל הוי אילו עשו חסד עם בית ירובעל זכרו את ה', הוי כל מי שהוא עושה חסד כאלו מודה בכל הנסים שעשה הקב"ה מיום שיצאו ישראל ממצרים וכל מי שאינו עושה חסד כאלו כופר: