Preheat oven to 425 degrees. Season the beef's surface with salt and pepper. Put in a heated skillet with butter, and sear side and ends for about 1 1/2 minutes each. Place tenderloin in refrigerator and cool. Put onions, mushrooms, salt and pepper in skillet, and cook until almost tender.
Add sherry and cook until no liquid remains. Season to taste and let cool. On a floured surface, roll puff pastry until 1/4" (6mm) thick and large enough to cover beef.
Spread tenderloin with pate' and the mushroom mixture on alternating sections. Fold up dough to enclose tenderloin and chill for 1/2 hour. Brush with egg. Cook at 425 degrees F. for 30 minutes to reach an internal temperature of 135 degrees F.