The pilot departed with an adequate supply of fuel in the airplane’s header fuel tank and remained in the airport traffic pattern. He reported that while on the downwind leg the engine “stumbled slightly.” The pilot turned the auxiliary fuel pump on and the airplane sustained a loss of engine power like it was, “starving for fuel.” He verified the fuel shutoff valve was fully open, retarded the throttle, and engaged the electric primer two to three times. The engine restarted, and the pilot continued in the traffic pattern downwind leg. Video recorded onboard the airplane during the flight, ADS-B flight track data, and air traffic control communication information indicated that following the loss/resumption of engine power, the pilot did not alter his previously established course, nor did he alert air traffic control to any difficulty. While on the downwind leg of the traffic pattern, air traffic control asked the pilot to extend his downwind leg in consideration of two other airplanes that were landing. The pilot was then cleared to land, when the airplane  was about 1.5 nautical miles from the runway threshold, turning from the downwind toward a base traffic pattern leg. About that time the engine lost power again while the airplane was above a heavily forested residential area. Almost directly ahead of the airplane was a golf course fairway that was relatively free of obstacles. The pilot continued the right turn away from the fairway and toward the runway threshold, over an area densely covered by trees and houses. Although the pilot stated the airplane contacted a tree, which resulted in a right yaw and descent, based on recorded video the pilot likely exceeded the airplane’s critical angle of attack and the airplane stalled before impacting the tree. The airplane then descended to impact with the terrain and a residence. Postaccident examination of the wreckage revealed minimal fuel in the engine fuel system components. The header fuel tank contained 3 to 4 gallons of 100 low lead fuel with no water present. A foreign object recovered from the header fuel tank matched the color of material Page 2 of 7 ERA23LA009used by the pilot/mechanic to seal the flange of the recently replaced fuel sending unit. Based on this information, it is likely that when the fuel sending unit was replaced, excess sealant applied to the flange compressed out into the tank during installation.Although the header fuel tank outlet was not observed to be blocked by the foreign material inside the tank, the symptom reported by the pilot, like the engine was “starving for fuel,” and the lack of any appreciable amount of fuel in the engine fuel system components were consistent with fuel starvation and subsequent near total loss of engine power. Based on the inflight video, ADS-B track data, and air traffic control communications information, the initial loss of engine power occurred while the airplane was still early in its progression around the airport traffic pattern. While the pilot was able to restart the engine, he did not otherwise deviate from the established traffic pattern path to return to, or at least deviate closer toward, the runway. The pilot also did not advise air traffic control of any need to deviate due to the engine anomaly. Had he taken these actions, it is possible that the accident could have been avoided. Additionally, after the airplane’s engine lost power a second time, had the pilot committed to performing a forced landing to the golf course fairway ahead, instead of attempting to continue the flight over houses and trees toward the runway, it is likely that the severity of the accident could have been mitigated.