Can I play Mysterious Treasure and discard a card if there are no cards left in my deck?
No, you cannot. Discarding the card is a cost not the effect, and you cannot play Trainer cards for no effect.
Source: TPCi Rules Team (2019-03-21)

Relevant cards

Note: All applicable cards may not be listed below.
SM6_113
SM6_113a
SM6_113a
SM6_145