The email address I used to set it up is no longer valid, and I don't remember the password.
Try to search in your email box.
Have you forgotten your Apple ID?, Check your Apple ID via your email box, see this Apple article: If you forgot your Apple ID
If you forgot your Apple ID email address or phone number - Apple Support
OR see -> Having trouble signing in?
https://iforgot.apple.com/password/verify/appleid
-----
You need to read -> this Apple article: What to do before you sell, give away, or trade in your iPhone, iPad, or iPod touch -> What to do before you sell, give away, or trade in your iPhone or iPad - Apple Support
Then you need to remove the iPad from your account, see this Apple article:
Check your Apple ID device list to see where you're signed in
Check your Apple ID device list to find where you're signed in - Apple Support
The buyer can then log in with his own Apple ID.