Judging from Cains reaction to his offering being refused his heart and mind were already in a dark place when (or even before) he offered his offering. Sane people don't react like that. Cain's mind was corrupted by inferiority thoughts, narcissism, competitiveness (does that word exist?) and envy.
Of course that's just my interpretation, but it's not far fetched considering how Cain's response was. I am much like Cain, and thus he's the biblical figure I identify most with....
Anyway, he didn't give his offering in love to God, but with a wrong motivation. He wanted attention/ recognition/ prasie from God and thus gave that offering not in order to serve God, but in order to serve himself, to have his narcissistic needs met. That's why God rejected it.
The whole Cain & Abel story is very interesting from a psychologcial point of view. It's telling us a lot about sibbling rivalery and about the dangers of envy and narcissism.
God actually tried to help Cain, he warned him or tried to comfort him. (Gen 4:6,7) So He didn't love Cain any less. And there is hope to overcome that sort of selfishness.
But I guess that brother rivalery had been going on for a long time and so Cain was hurting too much to heed God's warning.