There was this guy I was friends with for a while and then unofficially dated for about a week before he broke it off. He said he wanted to still hang out, but he ignored me very intentionally after that. There was this horrible tension every time we saw each other to the point where we almost became enemies. I had the feeling, though, that he was really struggling with something and didn't have a lot of people he could talk to. Whenever I read the scriptures, watched conference, prayed, I had a really strong prompting to be his friend and be there for him. So I went and talked to him and the first thing he said when I asked a simple "How are you?" was how he was struggling with exactly what I thought he was struggling with. He had never told me about it before. I just knew. So I took that as a confirmation of my prompting. I told him I didn't have feelings for him anymore, told him what our friendship meant to me and how it didn't make sense to destroy it over a week of nothing.
So we hung out with a group of friends like we used to, but after that he started ignoring me and avoiding me again, even though I continued to try and act on the prompting by reaching out to him and being his friend, but without being excessive or overbearing. He said something to my friend behind my back that made it obvious he in fact didn't want to hang out with me anymore, so I gave up. Why he acted the way he did is a mystery that I'm not going to bother trying to figure out. Our friendship is ruined beyond repair and I've done everything I could, so I'm not asking for advice on how to fix it. My question is, why did I receive a prompting to be his friend in the first place when it obviously wasn't the right thing to do?