There is no GUI available in the SharePoint Central Administration website to delete a SharePoint 2010 application pool.
Deleting the application pool from the Internet Information Services (IIS) manager is also not helping as you will still get the error when trying to create a new application pool with the same name.
The only way is to delete the application pool entry from SharePoint is via PowerShell command.
Here are the steps:
Remove-SPServiceApplicationPool -Identity "Service Application Pool"
Commands in the article didn't work for me so I used the above.