When using Centiscorch VMAX's "G-Max Centiferno" attack, can I get a Heat Energy from my discard pile?
No, you may not. Heat Energy only counts as a Fire Energy card while it is attached to a Pokemon, not when it is in the discard pile or anywhere else.
Source: TPCi Rules Team (2020-08-13)
When using Centiscorch VMAX's "G-Max Centiferno" attack, do I get +40 more damage for the Fire energy I attach during the attack?
No, the attachment of Fire Energy from the discard pile takes place after the damage calculation of the attack is done. Also, you don't get to attach the Fire Energy if the attack didn't do any damage.
Source: Darkness Ablaze FAQ (2020-07-31), TPCi Rules Team (2020-08-13)