Stop trying to figure out how and why you got hurt. Your situation is not unique at all. Whether you were right or wrong means absolutely nothing at this point. All that matters is your willingness to move on in God and trust his mysterious workings in your life.
“…Think it not strange concerning the fiery trial which is to try you, as though some strange thing happened unto you: But rejoice, inasmuch as ye are partakers of Christ’s sufferings; that, when his glory shall be revealed, ye may be glad also with exceeding joy” (1 Peter 4:12, 13).
Most likely you did what you had to do. You moved in the will of God, honestly following your heart, willing to give of yourself. Love was your motivation. You did not abort the will of God, someone else did. If that were not true, you would not be the one who is hurting so. You are hurt because you tried to be honest.
You can’t understand why things blew up in your face, when God seemed to be leading all along. Your heart asks, “Why did God allow me to get into this in the first place if he knew it would never work out right?” Even Judas was called by the Lord; he was destined to be a man of God. He was handpicked by the Savior and was used of God. But Judas aborted God’s plan and broke the heart of Jesus! What started out as a plan of God ended in disaster because Judas chose to go his own way.
Lay off all your guilt trips. Stop condemning yourself. Stop trying to figure out what you did wrong. It is what you are thinking right now that really counts with God. You did not make a mistake; more than likely, you simply gave too much. Like Paul, you have to say, “The more I loved, the less I was loved” (see 2 Corinthians 12:15).