Assignment to heaven and hell indeed imply certain states of mind. (Cf. the excellent novella by C. S. Lewis treating this very topic, The Great Divorce.) However, the traditional understanding of the afterlife is that those who have died experience a foretaste of what awaits them in the general resurrection occurring upon the second and glorious coming of Christ Jesus. Here are some thoughts that I hope clarify this issue:
First of all, upon Christ's death upon the Cross,
52 ...the graves were opened; and many bodies of the saints which slept arose, 53 and came out of the graves after his resurrection, and went into the holy city, and appeared unto many. (Matthew 27:52-53, KJV)
Presumably these had not exactly committed their lives to Christ, but only hoped on the Lord God and looked forward to the day that God would raise up a horn for His people, and died in this hope. It is thus not a stretch to envision God raising to life the righteous of cultures less privileged than the Hebrews, let alone less privileged than the church, Christ's very Body.
Second, God is just, and not just by fiat. We know by experience that Christ is indeed the most fully qualified Judge, for he judges impartially, not following His own will, but that of His Father, the very Author of justice. Indeed, if we merely look at His life among us in the gospels, we see a just man. So we should not despair that God would do injustice, for that is not in His character. We also know God appoints all things for the benefit of those whom He loves, viz. those that He created. So if someone should perish outside the Gospel, then perhaps he would have resisted it had he heard it, and it would have been accounted to him as a greater condemnation.
Third, no one will be in Hell who has not chosen to be there. Even Christ, Who despoiled Hell, chose to be there for our salvation (for only He could leave it, having no sin). Furthermore, God respects the free will of His creatures, and He allows those who choose to live apart from Him do so, if indeed such existence can be called life. If someone consistently and unrepentantly refuses the love of God, then God help such a person, for he has torn down the very bridge to salvation that is repentance. One may very well imagine that such a condition could, like a black hole, collapse irreversibly and irredeemably upon itself, setting someone in a permanent condition of ever-growing antipathy to God. (There are positively terrifying examples of this in Lewis's aforementioned work.) This is hell, and a place is appointed for such, and the place is also hell.
With regards to thinking about the eternality of heaven and hell, one would be a fool not to work for salvation now, which, as Tolstoy puts it, is the only time in which we have any power to act. The gravity of what is at stake is so great that indulging in wishful thinking about what salvation may come later can be disastrous. If it is your own salvation you are thinking about, then yes, heaven and hell are eternal. And indeed they are eternal. Time ends when the resurrection comes, and with time goes all hope for work towards salvation. If ever you have opportunity for salvation, seize it now!
However, if you are distressed about the eternal destination of a neighbor, then pray for that neighbor. Many stories (at least in Eastern Orthodoxy) tell of saints who foresaw perdition for the dead and earnestly prayed God that such a fate would be averted, and God answered their prayer and restored even the truly dead to true life. For example, I think one of the Sts. Gregory thought Emperor Trajan had misunderstood Christians and shouldn't be sent to hell, and earnestly prayed Christ that he would escape this. Also, more recently St. Silouan of Mt. Athos prayed to God that his incorrigibly vindictive elder would escape hell, and God answered his prayer too.
In conclusion, recall these eschatological verses:
13Every man's work shall be made manifest: for the day shall declare it, because it shall be revealed by fire; and the fire shall try every man's work of what sort it is.
14If any man's work abide which he hath built thereupon, he shall receive a reward.
15If any man's work shall be burned, he shall suffer loss: but he himself shall be saved; yet so as by fire. (1 Corinthians 3:13-15, KJV)
Also recall the Lucan parable of the minas/pounds.
12A certain nobleman went into a far country to receive for himself a kingdom, and to return.
13And he called his ten servants, and delivered them ten pounds, and said unto them, Occupy till I come.
14But his citizens hated him, and sent a message after him, saying, We will not have this man to reign over us. 15And it came to pass, that when he was returned, having received the kingdom, then he commanded these servants to be called unto him, to whom he had given the money, that he might know how much every man had gained by trading.
16Then came the first, saying, Lord, thy pound hath gained ten pounds. 17And he said unto him, Well, thou good servant: because thou hast been faithful in a very little, have thou authority over ten cities. 18And the second came, saying, Lord, thy pound hath gained five pounds. 19And he said likewise to him, Be thou also over five cities.
20And another came, saying, Lord, behold, here is thy pound, which I have kept laid up in a napkin: 21For I feared thee, because thou art an austere man: thou takest up that thou layedst not down, and reapest that thou didst not sow.
22And he saith unto him, Out of thine own mouth will I judge thee, thou wicked servant. Thou knewest that I was an austere man, taking up that I laid not down, and reaping that I did not sow:
23Wherefore then gavest not thou my money into the bank, that at my coming I might have required mine own with usury?
24And he said unto them that stood by, Take from him the pound, and give it to him that hath ten pounds.
25(And they said unto him, Lord, he hath ten pounds.)
26For I say unto you, That unto every one which hath shall be given; and from him that hath not, even that he hath shall be taken away from him.
27But those mine enemies, which would not that I should reign over them, bring hither, and slay them before me.
(Luke 19:12-27, KJV)
So some are saved comparatively handily; some are saved truly as if through fire; and yet some still spurn the love of God, even eternally.