Although the Vietcong and Hanoi were badly mauled during Tet , they delivered , through the media , such a psychological blow to U.S. hopes of '' winning '' in Vietnam that Tet is widely credited with eroding support for President Johnson and driving him to withdraw as a candidate for re-election .