Sefer Gan Hadasim writes the following in the name of Rav Yehoshua of Tomashov zy”a: One Shabbos at shalosh seudos, the Sar Shalom of Belz zy”a was asked why in the vidui of maaser, we recite the words: “I did all that You commanded.” The vidui seemingly connotes admitting to wrongdoing. Why would we say that we did everything right in a vidui?
He answers that every Jew knows that he has not fulfilled everything demanded of him. We know that we have barely begun to fulfill our obligation but we still are told to say that we did everything that Hashem commanded. It stands to reason that when one says this, it will be with a broken heart and much regret for his shortcomings. And when one feels his heart break with regret and desire to fully do the will of Hashem, that is the true vidui.