You can get an app that will turn the power off, but you can't run anything to turn it back on when it's off.
So, as Belodion said, you'll have to get it fixed. (Unless you want to just remove the button and see if you can bend a paper clip just right so you can short the contacts of the switch - but that's dangerous, you could accidentally short something else and blow thew motherboard.