Can I reinforce a beam by cutting the rotten part away and adding an extra piece instead?
I think you have several options depending on how the roof is framed. There is some missing info so I’ll make some assumptions and you tell me if I’m wrong.
Option #1: Patch in wood. If the roof trusses span from side to side, then there is very little load on the beam. The beam has not sagged, which is an indication that it’s over sized. Therefore, you could remove the dryrot portion and not affect the structural integrity. (You’ll need to fill in what is removed, so the metal siding can be reinstalled.)
Option #2: Do nothing but stop the leak. An interesting thing about dryrot is that it stops once the moisture is stopped. You’ll need to reinstall the siding AND seal the siding joints. If the existing wood is too “punky” to hold nails and screws, then you’ll need to insert blocks of wood, similar to Option #1 to hold the siding.
Option #3: Restore the beam to its original “full strength”. This is the most difficult repair and is probably not required. You may cut the dryrot away and you don’t need a dovetail cut. Just cut the wood so that new wood can be glued back in place. You need lots of clamps and lots of wood glue. Essentially, you’ll be making a glu-lam beam. Make sure all surfaces are coated in glue and sufficiently dried. However, I believe this is overkill.
In all the options, the end connections need to be secured to the side beams. Depending on the design of the roof trusses, the beam is actually a “tie beam” and it’s purpose is to keep the side beams from spreading apart.