Hi and welcome to FnF, I am sorry it is under these circumstances.

First off, that tank does not need a filter since it will need 100% water changes. If it was me, I would remove the filter and the undergravel plate since they are not needed. A 1g tank needs 100% water changes every 2 to 3 days so I would recommend an immediate 100% water change with same temp, same pH water. Through respiration and waste products, fish produce ammonia and it is toxic to fish so you may be seeing ammonia poisoning which is why I recommended the water change. Let us know if he perks up after the water change. Don't forget to add the water conditioner to the new water. Here is our article on velvet, using a flashlight to see any gold dusting may help.

Flaring is typical for bettas but if he is darting around or seems to be itching against things, then the ER mods would need to know that.

You sure got a pretty boy there!

-Shelly