In my religious background, there is huge emphasis on fearing God, fearing His wrath, and hell. Hell is very graphical. Here are some verses showing how graphical it is:
"And if ye do it not - and ye can never do it - then guard yourselves against the Fire prepared for disbelievers, whose fuel is of men and stones." (Q 2:24) "Lo! Those who disbelieve Our revelations, We shall expose them to the Fire. As often as their skins are consumed We shall exchange them for fresh skins that they may taste the torment. Lo! Allah is ever Mighty, Wise." (Q 4:56) "For such, their habitation will be hell, and they will find no refuge therefrom" (Q 4:121) "Lo! the hypocrites (will be) in the lowest deep of the Fire, and thou wilt find no helper for them;" (Q 4:145) "Lo! those who disbelieve and deal in wrong, Allah will never forgive them, neither will He guide them unto a road, Except the road of hell, wherein they will abide for ever. And that is ever easy for Allah." (Q 4:168-169) "They will wish to come forth from the Fire, but they will not come forth from it. Theirs will be a lasting doom." (Q 5:37) "Theirs will be a bed of hell, and over them coverings (of hell). Thus do We requite wrong-doers." (Q 7:41) "O ye who believe! Lo! many of the (Jewish) rabbis and the (Christian) monks devour the wealth of mankind wantonly and debar (men) from the way of Allah. They who hoard up gold and silver and spend it not in the way of Allah, unto them give tidings (O Muhammad) of a painful doom, On the day when it will (all) be heated in the fire of hell, and their foreheads and their flanks and their backs will be branded therewith (and it will be said unto them): Here is that which ye hoarded for yourselves. Now taste of what ye used to hoard." (Q 9:35) "Know they not that whoso opposeth Allah and His messenger, his verily is fire of hell, to abide therein ? That is the extreme abasement." (Q 9:63) "Hell is before him, and he is made to drink a festering water, Which he sippeth but can hardly swallow, and death cometh unto him from every side while yet he cannot die, and before him is a harsh doom." (Q 14:16-17)
Even though I have left this religion but I get this nightmare that I am getting punishment for leaving the religion. I feel scared that what if I am wrong and end up burning in hellfire.
How to get rid of this fear so that I can live my life freely?
If you truly believe that hell exists and you fear punishment in the afterlife, then you are still fundamentally religious at heart.
I don't choose not to believe in hell, nor do I choose not to believe in the words of the Bible, Torah, Quran, or other dogma from other religions. I simply never believed them in the first place. I don't fear being wrong and being punished in the afterlife, because I don't believe in heaven, hell, gods or devils. (And even if I did believe in a god, I would never believe in one that is so petty that they would smite me for having doubts or other beliefs.)
In my view, fear is used by religious authorities to control people, so that they will submit without question to arbitrary rules and limitations that they would not otherwise follow. Fear and reward are great motivators.
I don't think you can truly be free until you have broken free from the shackles of fear that were designed to keep you in line with the teachings of your former religion. You are still being controlled by that fear today because you still aren't sure whether you believe or not.
I have doubts, not firm belief in the hell.