Just because you don't get what you want doesn't mean you have lost eternal life.
Salvation is not the same as not getting your prayers answered the way you want them to be.
If you have faith in Christ for your redemption then you have passed from death to life, from condemnation to redemption. You are marked, sealed, and delivered. Unless it is a false conversion there is no going back.
Your faith in Christ can't be based on your circumstances or your unanswered prayers since life is full of troubles and trials. Jesus said you would have trouble in this world but that he overcame the world. You can also overcome through Christ.
Faith in Christ is more than just belief, it is trust. You need to put your total trust in Jesus for your redemption. Jesus keeps all those that belong to him no matter what the circumstances. There are a lot of things out of our control, especially other people so don't let your circumstances dictate your faith.