A good word from Dr. Jim Denison:
Scripture warns us: "Do not grieve the Holy Spirit of God, with whom you were sealed for the day of redemption" (Ephesians 4:30). When we choose to sin, we grieve the Holy Spirit who indwells us this moment, who sees everything we see and knows everything we know.
By contrast, when we choose to reject temptation and live by our Father's word and will, we gladden the heart of our Lord. There is "rejoicing in heaven over one sinner who repents" (Luke 15:7). God knows our inner feelings and genuine motivations. He delighted to say, "I have found David son of Jesse a man after my own heart; he will do everything I want him to do" (Acts 13:22).