Thanks for all the replies! So I've been busy these last couple of days trying to solve my issue and I wanted to you give you all an update.
The first thing I tried was to follow the suggestions of resetting SMC and NVRAM (thanks Linc and iCare!), but none of them worked, after rebooting my iMac the bluetooth was in the same state.
My next step was to contact Apple support, and I've been almost around two hours running several tests to the machine, and the first session concluded leaving the machine overnight while doing a clean install of the OS. It didn't work either, next day El Capitan 10.11.5 was ready to be used and clean as new, but bluetooth continue disconnected. Apple support called me again and told me to go to an Apple Store and contact a technician there in person. So I did, I got my appointment and headed there.
At the store, they installed the OS from scratch again like 3 times (good thing is they do it in a way that it doesn't take more than 10 min for a full installation, what was pretty awesome considering that at home it took several hours, even with a 50MB Internet connection). Every time they did a new installation, Bluetooth came up disabled till finally they decided to downgrade the OS version back to 10.11.4. This time Bluetooth was working without any problems. At that point there were a couple of technicians gathered by my iMac and they all agreed that the Bluetooth issue was a bug in the latest version of El Capitan. Sadly the technical coverage for my iMac is expired (I bought it in 2014), for this reason they didn't offer any alternatives and they told me they were reporting the issue and all I can do now is wait for the bug to be fixed in future versions of the OS. I had an argument here with them, cause it's not like I did anything wrong with my machine, what happened is that their software update ruined it, but I got nothing out of it.
When I came back home, I realized I already had at least a week of backups in Time Machine with version 10.11.5, so I didn't have a choice but to restore back all my stuff in this version disabling again the Bluetooth. This is the situation I am now, without Bluetooth I cannot use external speakers for sound anymore, and also instead of using the magic mouse I'm using an old cheap plastic mouse I had from an old PC. I know I could create an external backup and downgrade again even from Time Machine, but I prefer to wait for a newer version of the OS and at that point I think I'm going to sell the machine. It's weird to think that you need to wait for an OS update to correct this and that they cannot release in advance something like a driver for the Bluetooth controller or so.
So thanks again to everyone for the help, but at this point I think I can only wait and hope the issue is fixed.