If I have slept with someone before marriage, will I go to hell and my name not be written in the book of life or can this sin be forgiven and my guilt go away?
All sin can be forgiven if a person will change his mind and change his behavior regarding that sin. "The Lord is not slack concerning His promise, as some count slackness, but is longsuffering toward us, not willing that any should perish but that all should come to repentance" (II Peter 3:9). Among those at Corinth were some who had once committed fornication, but had changed. "Do you not know that the unrighteous will not inherit the kingdom of God? Do not be deceived. Neither fornicators, nor idolaters, nor adulterers, nor homosexuals, nor sodomites, nor thieves, nor covetous, nor drunkards, nor revilers, nor extortioners will inherit the kingdom of God. And such were some of you. But you were washed, but you were sanctified, but you were justified in the name of the Lord Jesus and by the Spirit of our God" (I Corinthians 6:9-11). So the matter is really up to you. Do you want to remain a sinner or stay wallowing in your self-pity regarding the sin you committed, or are you going to do something about it?
The guilt isn't going to go away. Guilt is there to remind us that we did wrong and to encourage us not to repeat that wrong. You should feel guilty that you had sex with someone who was not your wife. It is the people who don't feel guilty for sinning who worry me more. Those are dangerous people. However, if you really change yourself and commit yourself to living as God wants you to live, you will remember that you sinned, but you will also know that you aren't that type of person any more. "For observe this very thing, that you sorrowed in a godly manner: What diligence it produced in you, what clearing of yourselves, what indignation, what fear, what vehement desire, what zeal, what vindication! In all things you proved yourselves to be clear in this matter" (II Corinthians 7:11).