When the poem says that "Parting is all we know of heaven," that seems to mean that the certainty of death is the only cosmic truth we know, our only glimpse of God's will. When it adds that parting is "all we need of hell," it seems to be saying that the suffering involved in losing loved ones (and in knowing we ourselves have to die) is the greatest pain imaginable, that hell itself could not be any worse.