We need to take responsibility for our actions and for our failures. But we can't wallow in them. We need to look for God's way to escape.
From Turning Point devotion -
But God is faithful, who will not allow you to be tempted beyond what you are able, but with the temptation will also make the way of escape. 1 Corinthians 10:13b
The source of one of the greatest insights about temptation is debated, though it is often attributed to the Protestant reformer, Martin Luther: "You can't stop the birds from flying over your head, but you can stop them from building a nest in your hair." If the birds are temptations, we can't prevent their presence in this world. But their presence should never be equated with the obligation to give them a place of residence in our life.
The apostle James gives the clearest description in the Bible of how temptation leads to sin: "But each one is tempted when he is drawn away by his own desires and enticed. Then, when desire has conceived, it gives birth to sin; and sin, when it is full-grown, brings forth death" (1:13-15). It's clear that we are responsible for allowing ourselves to be "drawn away" from righteousness by our own carnal desires. It is a process—temptation, yielding, birth, spiritual death—that we can stop with God's power.
It's not a sin to be tempted, but it is a sin to follow after temptation and not take the way of escape God provides.
Holiness is not freedom from temptation, but power to overcome temptation.
G. Campbell Morgan