It wasn’t your fault.
(Although a fan won’t cool a room down anyway. If a room is already too hot, a fan will only blow hot air around)
We would normally suggest speaking to a rescue centre to get their help in compatibility but if he is in acute pining then he needs a friend straight away. I’m not sure what you have near to you, but buying a new friend from a pet shop is sometimes the only option when a bereaved piggy is in acute pining.
I will be honest, unless you can date him to find a compatible friend then there is always a risk that the two piggies won’t be compatible and won’t bond. If that happens then the two piggies will need to live side by side in separate cages. However this is the next best thing for him as at least they can interact through the bars which can help ease any loneliness.
If your boy is already neutered, then you can find him a sow.
If he is not neutered and is already struggling being alone, then you will not have time to go through the neuter and six weeks post op wait process before finding a friend; as it will simply too long for him to be alone.
Your options are to find another boar for him (a baby boar could be well accepted);
or to find a sow and have them live in separate cages while your boy is not neutered, neuter him and then when he is six weeks post op safe, then carry out the bonding