Cats, like people, may respond to stress, grief, boredom, or anxiety by eating more. Any sort of change in the house can trigger excessive eating. So yes, there is a chance that the loss of your cat’s best friend is playing a role in this matter.
There also is a chance that, like many people, your cat just likes to eat. You took an appropriate first step when you switched him to a weight management diet. There is debate in the veterinary community about which form of weight management diet is best. Since your cat is still gaining weight, talk to your veterinarian about whether a different diet might be more effective.
Another option would be to reduce the quantity of food that your cat receives each day. Simply put: if he’s gaining weight, he’s eating more than he should. However, this could make the begging problem worse.
So, how to deal with the begging? Many people have told me that they were able to eliminate begging by purchasing an automatic pet feeder. Using one of these devices causes many cats to stop viewing the people in the house as food suppliers. Eventually, they stop begging because the behavior never is rewarded. You may have to endure a painful adjustment period before the begging stops, and this trick does not work for every cat. But it is the best one I know.