Umar Ibnul Khattaab (radiyallaahu-anhu) was written (a letter) and asked about this affair, as to which of the two men is the best; a man who is neither put at risk through lowly desires nor is he made to endure the thought of it, or a man who is pushed towards (lowly desires) but abandons it for the Sake of Allaah? Umar (radiyallaahu-anhu) wrote back saying: ”The one who is desirous of sin but abandons it for the Sake of Allaah is from ‘those whose hearts Allaah has tested for piety. For them is forgiveness and a great reward.’ (¹)(²)
Imaam Sadi (rahimahullaah) said:
The one who adheres to the command of Allaah, seeks after His pleasure and hastens towards it and gives precedence to it over his desires; then (indeed this is) a genuine and pure (manifestation) of Taqwaah, and his heart becomes reconciled with it. And the one who is not (like this), then he knows that he is not reconciled with it.(³)
And Allaah knows best.