To delete an email account on your iPad's Mail app, open the "Passwords & Accounts" section of the Settings app.
You can delete all of your emails on Yahoo Mail using "Select All" repeatedly, or you can use the "Clean your Inbox" tool to archive your inbox.