It's our Halloween episode The Twilight Zone (1959)
In this pilot episode of The Twilight Zone Where Is Everybody
Mike Ferris finds himself alone in the small Oakwood town and without recollection about his name, where he is or who he is. Mike wanders through the town trying to find a living soul. The tension increases and Mike has a breakdown.