This answer will be updated along the process. So for now, it just holds initial steps / a raw solution.
There are several things you can try to get your device back to working normal. I will list some steps; just break as soon as anything came back to normal: in that case you will not need to walk the remaining steps unless the last step taken explicitly mentions something alike:
battery check
take out the battery, leave it out for at least 30s (2min won't hurt, more should not be necessary).
insert battery again, but do not yet switch on your phone.
fully charge your phone on AC (not USB from a computer).
switch it on again. If it's working now, everything's fine and you are done.
faulty apps check
shut down your phone
start it in "safe mode"
(how to do that depends on the device; on the SGS2 this should be accomplished as follows: Press power and menu, then release the power key but keep pressing the menu button. The word "Safe Mode" will be displayed on lower left if I'm not mistaken. -- source: LowYat.Net; I have no SGS2 so I cannot verify)
none of your self-installed apps will be started in safe mode, only system apps are available. Check if the behaviour changed (I guess not, but it's a good point to know for the last group below).
while in safe mode, try to backup as much things as you can reach. If already on Android 4.0 or higher, see Full Backup of non-rooted devices for how to safe the most of your precious stuff, but better stick to separate small packages (backup on a per-app basis, as restoring the full package later might bring the problem back). On rooted devices, Titanium Backup is probably the best choice.
this was just an intermediate step; even if your phone is working normally in safe mode, this will not have fixed the issue for "normal operation", so go on.
factory reset
do a factory reset of your device (warning: all your data and self-installed apps will be lost from the device, hence the backup recommendation above; your sd card should not be affected, but it cannot hurt to copy all its data to your computer as a backup before doing the factory reset)
startup the device again. Before installing all your apps again, make sure the issue has been fixed by the reset.
if your device is back to normal, you can go on re-installing your apps / restoring your backups app-by-app. Between each app, make sure to test a while: if any of the apps was the cause, you might otherwise bring the problem back by restoring the "faulty" backup. If that happens, remember which app it was; start over from step 3.1. and ommit this app in the next run.
if you've restored everything, and your device is still working normal: congratulations, you're done!
if the issue still remains, it has to be some hardware issue. Could be the battery is broken, so next I would go to your local dealer (best the one where you've bought it), and try with a "spare battery" from his store. Explain the reasons, including the results from the "safe mode check", and also that you've already tried a factory reset (because that's the first thing he will do otherwise). If the new battery solves you issue: buy it If not, next step:
If you still have warranty, send it in for repair (or let the "local dealer" handle this for you). Make sure all details (including results from the "safe mode check" and the fact you already tried a factory reset without this solving your problem) are included with the report.
if you don't have warranty anymore, ask the dealer what a repair might cost. It could be cheaper to simply buy a new phone...