Like an earthly father who disciplines us, we must also accept God's discipline for our own good. He is correcting you for the purpose of molding your character. You must submit and endure to His discipline. God is dealing with you as with sons. He loves to correct those people that He loves. So, when He's disciplining you, He loves you. It is part of our training to inherit His Kingdom.