There are two instances in a believer's life when God doesn't seem to be around: first, when He's testing us to see if we'll be faithful no matter what. And second, when we sin against Him.
I'll focus on the second.
God is very patient. It's not possible to tick Him off just like that, but there are times when the sin is too much that God chooses to depart from a person, and this can happen temporarily or permanently.
Some instances happen that when we commit a sin, we honestly don't know that we have committed one. So, God convicts our hearts and infroms us very gently, "You need to repent from this." A genuine sorry wipes it away squeeky clean. However, there are times when we're actually aware of what we're doing, but choose to do it anyway despite our conscience already warning us not to. If we are truly honest with ourselves, we will admit that times like such does happen.
There is an amount of grace provided for each of us. It's not unlimited. See, God wants us to learn from our mistakes so that we won't do 'em again and not commit the same crime over and over and over and over again. He disciplines us, and to do it, sometimes He departs His presence from our lives. What will we do then? Will we continue to sin, or will we repent?
I will return again to my place, until they acknowledge their guild and seek my face, and in their distress earnestly seek me. Hosea 5:15ESV
When we do something wrong, it takes only an apology to make it right with God. 1 John 1:9 says that, "If we confess our sins, He is faithful and just and will forgive us our sins and purify us from all unrighteousness." Many times, people are more complicated than God. When people say, "I'll forgive you if..." or "I'll forgive you when..." "I'll forgive you only if you do this..." God, in His lovingkindness, just says, "Say sorry and we're good."
If you feel like God has abandoned you, do a checking on your heart and ask God to remind you of things that you have not repented from. From there, seek His forgiveness and He will return to you.
Stubborness, however, is not a good thing. There are people who justify their sins and refuse to repent from them and end up totally cast out from the presence of God. It's scary because without His presence, there is no protection, no blessing, no favor, no guidance, and it's all back to the way of the world...no peace, no joy, no healing. People who deny their sins and insist on not repenting end up in hell. God doesn't want that, so in His mercy, He'll do everything that is possible to save a person. But like I said earlier, grace is not unlimited. Jesus says that, "Unless you repent, you too will all perish (Luke 13:3)."
Excuses like, "God will forgive me anyway," "I'll sin now, repent later," "God will love me even if I don't forgive," et cetera, are dangerous. God cannot be mocked. Such excuses declare the condemnation of those who say them.
No one born of God makes a practice of sinning, for God's seed abides in him; and he cannot keep on sinning, because he has been born of God. 1 John 3:9
People who are genuinely born-again lose their desire to sin. They aren't able because it's just not there anymore. Sure, they may make mistakes once in a while, but the Spirit of God convicts and the fear of the Lord drives them on their knees.
If you, however, don't mind sinning at all. If you encourage it, and keep on doing it despite claiming that you're born-again. It's time to check whether you're really saved because if you're not, well, you know where sinners go.
Repent while there's grace. God loves you so much that He doesn't want to lose you; but your own salvation is up to you. God won't save you if you don't want to save yourself.