“And this is what God has testified: He has given us eternal life, and this life is in his Son. Whoever has the Son has life; whoever does not have God’s Son does not have life. I have written this to you who believe in the name of the Son of God, so that you may know you have eternal life.”
1 John 5:11-13 NLT
Our certainty is based on Gods promise that he has given us eternal life through his son. This is true whether you feel close to God or not. Eternal life is not based on feelings, but mere fact. You can know you have eternal life if you believe Gods truth. If you lack assurance about your honesty committed your life to Christ as your savior and Lord.