Brown is forced to accept--but in fact does not, and therefore despairs--that Faith as a virtue is indeed "a poor little thing" (which is how he refers to his wife when he leaves her) and that he cannot take it for granted. His real or imagined trip into the forest where he learns about evil challenges his faith, and he loses it. He think he can withstand temptation, but goes so far to the edge that in fact does lose his faith in the goodness of humanity and the justice of God. What he should learn is that faith needs to be nurtured and cared for and not arrogantly challenged. He thinks he is strong enough to exist without it as he walks into the unknown ("poor little faith") but in fact he is not.
I think Brown has been forced to accept the dual nature of humans. Prior to his little venture into the woods with Satan himself, Brown believes, as a devout Puritan, he is predestined for heaven. He states that once he returns to faith he will cling to her skirts and follow her to heaven. However, as soon as he enters the woods he begins to see that the people around him, who Brown thinks are virtuous, may not be so great. For example, he learns that the devil knew his father and grandfather. He also learns that three of the people he respects most, Goody Cloyse, Deacon Gookin, and the minister are also well acquainted with the devil. He never is able to reconcile this and that is why he dies a bitter man.
It is interesting to note that Brown never accepts the duality of sin in himself. He is able to see the sinful nature in others, but does he see it in himself? Just look how easily he gets lured deeper into the forest, despite his declarations to turn back. Eventually, he is even driven to rage and tear through the woods so that he is the most frightening thing in it. Maybe if Brown had been able to recognize his own sins, he might have been able to accept the sins of others and lived a happier life.
I think that Goodman Brown has been forced to accept that all people are sinners and that in some way even those who he felt were "good" have natures given to them by Satan, and serve him. He has to accept this duality of good and evil even in his wife, Faith. He does not accept this well, and it changes him into a bitter and suspicious man giving Satan far more control in his life than he may have had if he had reached this acceptance with more equanimity.