The idea of Imperialism was to spread European civilization to far and exotic places; this would allow outposts and military camps for strategic intelligence, as well as allowing the import of expensive goods without the trouble of dealing with native peoples. Kurtz represents the worst of that thinking, allowing his ability to influence and control the natives to give him delusions of grandeur; he is unable to separate his job from his need to control, and so even as he exerts his influence on the jungle, it destroys him from the inside. The ethical certainty of Imperialism that native peoples needed to be "saved" or remade in European image fails because of Kurtz's selfishness and his madness.
Marlow has a similar epiphany, but is saved by his fundamental decency; he views the natives with disdain, as all Europeans did at the time, but also allows them their humanity. For instance, when he views a line of prisoners, he thinks:
They passed me within six inches, without a glance, with that complete, deathlike indifference of unhappy savages. Behind this raw matter one of the reclaimed, the product of the new forces at work, strolled despondently, carrying a rifle by its middle.
(Conrad, Heart of Darkness, eNotes eText)
His view is typical of the time, as native people were seen as child-like, able to be "reclaimed" and formed into almost a parody of accepted, civilized norms. However, through this patina of indred racism, he tries to make his small piece of the world better, not worse, and so he represents the best ideals of Imperialism; his survival contrasts with Kurtz's death because while the missions slowly failed and withdrew, the ideals remained alive for years after.