Matthew 6:14-15
14 For if ye forgive men their trespasses, your heavenly Father will also forgive you:
15 But if ye forgive not men their trespasses, neither will your Father forgive your trespasses.
Mark 11:25-26
25 And when ye stand praying, forgive, if ye have ought against any: that your Father also which is in heaven may forgive you your trespasses.
26 But if ye do not forgive, neither will your Father which is in heaven forgive your trespasses.
Matthew 18:33-35
33 Shouldest not thou also have had compassion on thy fellowservant, even as I had pity on thee?
34 And his lord was wroth, and delivered him to the tormentors, till he should pay all that was due unto him.
35 So likewise shall my heavenly Father do also unto you, if ye from your hearts forgive not every one his brother their trespasses.
These three passages all teach the same thing - if a Christian is not forgiving, God will not forgive them.
Does this mean that an unforgiving Christian will be sent to Hell when they die?
There are multiple senses in which we are forgiven of our sins in Scripture.
In the first sense, which is often called "judicial forgiveness", the Word of God is clear that all of our sins are already forgiven:
Colossians 2:13-14
13 And you, being dead in your sins and the uncircumcision of your flesh, hath he quickened together with him, having forgiven you all trespasses;
14 Blotting out the handwriting of ordinances that was against us, which was contrary to us, and took it out of the way, nailing it to his cross;
Notice above that this is in context to the "cross". Our judicial forgiveness, where our sins are paid for, and are no longer the basis for an eternal condemnation, is 100% based on what Christ did on the cross, which is why the Bible speaks multiple times about forgiveness of sins in reference to Christ's "blood" (Ephesians 1:7, Colossians 1:14, Romans 3:25), and says that Christ has "washed us from our sins in his own blood" (Revelation 1:5) - which is in the past tense, because it's a completed operation, not an ongoing process.
This forgiveness is not appropriated by forgiving others, but rather by faith in Christ:
Acts 10:43
43 To him give all the prophets witness, that through his name whosoever believeth in him shall receive remission of sins.
The fact that this judicial forgiveness is obtained by faith is also manifest by what the Bible says about how one is "saved". When we speak about "Salvation", or being "saved", we mean being "saved from your sins" (Matthew 1:21).
To this end, the Word of God is redundant in stating that we are "saved through faith", to the exclusion of "works of righteousness" (Ephesians 2:8-9, Titus 3:5), which of course, includes forgiving other believers.
The second type of forgiveness, often called "fellowship forgiveness", has to do with our temporal relationship with God and others, and having that fellowship affected by our trespasses.
This forgiveness must be obtained daily, because we sin daily, and still have bodies of corrupt flesh capable of displeasing God, and sinning against other people - something covered at length in this article.
This speaks to the truth that God still punishes disobedient believers - but their punishment is limited in scope to this life:
Hebrews 12:6-7
6 For whom the Lord loveth he chasteneth, and scourgeth every son whom he receiveth.
7 If ye endure chastening, God dealeth with you as with sons; for what son is he whom the father chasteneth not?
This "chastening" is what the reference to being "delivered to the tormentors" in Matthew 18:34-35 is referring to. Disobedient believers are "delivered unto Satan for the destruction of the flesh" (1 Corinthians 5:5: 1 Timothy 1:20), to receive punishment here in this life.
The way that this temporal judgment is circumvented is to be generous and liberal in our forgiveness of others, as our passages in question clearly teach, and also to confess our sins to God:
1 John 1:6-9
6 If we say that we have fellowship with him, and walk in darkness, we lie, and do not the truth:
7 But if we walk in the light, as he is in the light, we have fellowship one with another, and the blood of Jesus Christ his Son cleanseth us from all sin.
8 If we say that we have no sin, we deceive ourselves, and the truth is not in us.
9 If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness.
The above passage is key - it's where the term "fellowship forgiveness" comes from. From it, we see that the way we restore our relationships in this life, whether with God or others, is to obey God, and confess our sins when we fail.
Then, we can pair this with our verses in question to learn the truth that the extent to which God forgives our sins is largely determined upon how forgiving we are with our brothers and sisters in Christ.
These passages do not teach that someone gets to Heaven by forgiving others. They teach the truth that our relationship with God in this life can be impacted by our sins, and we can still be punished for our sins in this life, because we still have carnal, sinful bodies.
They exhort us to be generous in forgiving other believers, in light of the fact that we need daily forgiveness from God and others, because of the sins done in the "body of this death" (Romans 7:24), "which is corrupt according to the deceitful lusts" (Ephesians 4:22).