Only doesn't have to mean lonely. Make sure that an only child has plenty of opportunities to play with others. Ask friends and relatives who have children to come over often and make sure your child spends time with them. Make young friends feel like part of the family; put an extra bed in your child's room to encourage friends to stay the night.
One parent at a time rather than both should discipline or criticise an only child; if both gang up on him it tends to make him feel he's one against the world and to envy children who have siblings to side with. You and your partner should take turns at the unpleasant chore. (Praise, on the other hand, is reinforced when both parents join in.)
Make time for silly behaviour now and then: a pillow or water pistol fight can be fun for everyone.