God loves to use moments like these to smack some sense into me and show me how much He loves me and wants me to just ask for forgiveness and get back up and serve Him.
I want to encourage you that no matter how bad you messed up, don't be discouraged. God wants a relationship with you so bad that he is willing to forgive you one 100 times even a million times. 1 John 1:9 says " If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness."
Ask our great Lord for forgiveness and ACCEPT it! Often time we dwell on the past and miss what is in front of us. After you ask for forgiveness and accept His forgiveness; read about His promises and about His love. Many times when I feel discouraged I forget about the Bible and how much power it has to encourage me. God's word is "living and active, sharper than any two-edged sword, piercing to the division of soul and of spirit, of joints and of marrow, and discerning the thoughts and intentions of the heart." Hebrews 4:12.
Let it go and rejoice. Set your thoughts on things above and not earthly things. (Colossian 3:2)
I hope and pray that this encourages you. Have a blessed day.