Before any bonding is attempted, both rabbits need to be spayed or neutered, with a few week passing after their surgery before you can start bonding. It’s not a good idea to have occasional visits from another rabbit, even if that rabbit has also been spayed or neutered, since it could confuse your rabbit when the other one leaves, plus, when any two rabbits are to be together, you have to go through proper bonding procedures. If you want him to have a companion, is should be a permanent one, who lives with him. You are lucky that no injuries occurred when you put your rabbit with your friend’s rabbit.
It is usually easier to bond a (neutered) male with a (spayed) female, but you can bond same sex rabbits. Here are 2 good articles on bonding:
https://binkybunny.com/BUNNYINFO/tabid/53/CategoryID/9/PID/940/Default.aspx
http://rabbit.org/faq-bonding-multiple-rabbits/
Rabbits usually do love to have a companion, to groom and to snuggle with, but be prepared for the bonding. It can go quick and easy or it can take several weeks or months and be stressful. I have bonded 5 different pairs, always a spayed female and a neutered male, and they were all very quick and easy, but that’s not always the case. I find that a good bonding method is to place the rabbits in an x-pen, with you in there with them to referee or to separate them in case bad fighting occurs. You start with short sessions, then increase the length every day.