First, acknowledge what you have done to the Lord. Ask Him to forgive you for choosing disobedience over obedience. Secondly, realize that God's love for you is not contingent on your performance record. Your relationship with Christ is restored when you forsake sin and agree to follow Him in obedience. Third, be responsible.
Some consequences are unavoidable.
Don't try to run away from the responsibility God wants you to assume. Running only makes matters worse. Therefore, be quick to humble yourself before Him and accept the needed responsibility. Finally, be honest. If you are still playing with sin, do not expect Him to rush to your side.