Encyclopedia of Mormonism, pg. 1074; “Mormons believe that Jesus Christ provides the means for all humans to become perfect. He is “the way, the truth, and the life: no man cometh unto the Father but by [him]” (John 14:6). Through his atoning sacrifice all men and women can repent and become perfected by having their sins and errors and the desire for sin removed. Ultimately, eternal life and godly perfection are gifts of God (D&C 14:7), rooted in the grace of God, redemption, individual righteousness, and being born of God. Human effort falls short; God’s gift of grace compensates for this shortcoming, “for we know that it is by grace that we are saved, after all we can do” (2 Ne. 25:23).”
Matthew 5:48; “Be ye therefore perfect, even as your Father which is in heaven is perfect.”
To summarize – it is only after you’ve done absolutely everything you possibly can in life then perhaps God’s mercy will might be able to fill in the gaps for what you missed.