Hello Anon,
It seems like you are having trouble identifying the true subject of the phrase, and that's why you can't tell if it should use a singular or plural verb. The subject is now in brackets. Don't make the verb agree with the closest noun, but with the overall subject. Have another try now.
1) [Having Bob and Mark as his friends] HAS/HAVE been good for him
2) [The fact that Craig has had a job and been a student] HAVE/HAS not helped him in his studies
3) [Knowing that he is going to the concert and then going to a party] HAS/HAVE made Robert happy
4) [The fact that [these theories] ARE/IS correct] HAS/HAVE been a boon to him