God loves every person, but hates every sin. There is nothing you can do to make The Lord stop loving you. He exists outside of time. Before time began He knew all the wrong you would do, yet Christ died for you anyway. Jesus’ death reminds us of His great love for us. His chastisement should as well.
Because God loves us, He punishes us at times. He is not simply ‘getting back’ at us. Christ is developing us into His image with every trial. A parent who says they love their child, but just lets that child do whatever they want is a liar; plain and simple. Our Father loves us too much to just watch us waste our lives. Sometimes when we get off track He gives us situations to get us back on track. If you feel the Lord is chastising you, then have joy knowing that He loves you too much to let you stay where you are.