These things happen within children when one is compared to another especially if the kid is already sensitive to begin with. Because Viren was always compared to Sid, he always compared himself to Sid and always saw himself losing. Even though his parents loved him, he doesn't feel worthy of it--of anyone's love. Because of that, he is taking it out on Sid who bechara has done nothing wrong to Viren.