One of the great masters of the spiritual life answered this question in this way: “Make sure for every look you take at yourself and your need, take ten looks at Christ.” At the end of the day, we don’t find the grounds of our salvation or assurance in ourselves or our own experience but in Jesus Christ.
You need to hold on to the promises that God has given you. For example, here’s a promise in the book of James: “You draw near to Me, and I will draw near to you” (James 4:8). Hold on to that promise rather than to the way you feel about who you are and what you are as a Christian. First and foremost, you always need to look to Christ, hold on to Christ, and hold on to the promises of God. Don’t just say, “O God, I believe your promises,” but look for specific promises that are applicable to your situation and hold on to them. God uses the occasions when we struggle in this way to discipline and teach us to trust in Him even when we can’t feel Him or see what He’s doing in our lives.