Disobedience and sin make us feel we're no longer close to God. Sin is one of the highest thing that can make us move away from God. Ignoring his teachings drifts us away from him. In Isaiah 59:2, it says that our iniquities have separated us from God. This shows that spiritual distance often begins within us, not with God.
When we pray and we feel our prayer was not answered by God, at that moment we begin to feel God have left us. God is never silent to our prayers just that his time is always the best. Yet the Bible teaches that God hears every prayer. Sometimes His answer is “wait” or “no” because He sees the bigger picture. Faith grows stronger when we continue trusting Him despite delay.
Hebrews 13:5, “I will never leave you nor forsake you.”
Finally, we must remember that feelings are not always facts. Whenever we feel we're far from him, prayer and repentance can bring us back to him. First of all confess our sins to him and ask for his mercy towards our lives.
As James 4:8 says, “Draw near to God, and He will draw near to you.”