From the way you've been describing his behavior toward you vs. how he acts with your BF I almost want to say it sounds like he's afraid of you.
Will he come up to you on his own or does he try to avoid being near you if at all possible? Watch closely if he changes when he notices you you enter the area he's in, does it look like he tenses up or does he just watch you? You said he would purr if you pet him but just because a Cat is purring doesn't necessarily mean it's happy, look at his overall body language. What is he doing with his ears? Do his pupils dilate? Does his tail puff out or start twitching rapidly? etc.
It would probably go a long way to helping the situation if you take a good look at body language cues in Cats, they will tell you all you need to know about how they are feeling toward you if you know what to look for. If he is afraid of you then re-homing him may indeed be the best option because that's not likely to change unless you make a major effort to interact with him in a more positive way, and given what you've shared about your current state of mind it's probably not a good idea to try to force yourself into something you aren't ready for.
It's probably been mentioned already but one possible thing to try is to see if any close friends or family members would be willing to take him for an extended period to give you time to work through things. That way he isn't being given up completely and your BF can still see him whenever he wants to, and when the time is right you can try him in your own home again.
Will he come up to you on his own or does he try to avoid being near you if at all possible? Watch closely if he changes when he notices you you enter the area he's in, does it look like he tenses up or does he just watch you? You said he would purr if you pet him but just because a Cat is purring doesn't necessarily mean it's happy, look at his overall body language. What is he doing with his ears? Do his pupils dilate? Does his tail puff out or start twitching rapidly? etc.
It would probably go a long way to helping the situation if you take a good look at body language cues in Cats, they will tell you all you need to know about how they are feeling toward you if you know what to look for. If he is afraid of you then re-homing him may indeed be the best option because that's not likely to change unless you make a major effort to interact with him in a more positive way, and given what you've shared about your current state of mind it's probably not a good idea to try to force yourself into something you aren't ready for.
It's probably been mentioned already but one possible thing to try is to see if any close friends or family members would be willing to take him for an extended period to give you time to work through things. That way he isn't being given up completely and your BF can still see him whenever he wants to, and when the time is right you can try him in your own home again.