Note: Modifying the default files is not supported by Microsoft. Microsoft recommends using custom Site Definition.
<List xmlns:ows="Microsoft SharePoint" Name="CustomDocuments" Title="Custom Shared Documents" Direction="0" Url="Custom Shared Documents" BaseType="1" EventSinkAssembly="TestEventHandler, Version=1.0.0.0, Culture=Neutral, PublicKeyToken=614ce6399d917f80" EventSinkClass="TestEventHandler.MyEventHandler" EventSinkData = "">Note:Here I hardcoded the EventSinkAssembly for sample. Could you please change it according to your component.
After configuring the details, if you create new document library based on the list definition, then the document library event handler will be automatically configured.