i cant seem to find any documentation that explains the internal of the bulbs.
I don't know how they work, and it's not something I would be tempted to experiment with myself because of the inherent dangers of working with mains voltages. If you can come up with a solution that uses a commercially manufactured sealed power supply to bring the mains voltage into a safe range for your LED control system that would be fine, but if you're thinking about building your own enclosure combining mains voltages and electronics then in my opinion that's dangerous and introduces a significant risk of electrocution and fire hazard.
To put it another way - if you knew enough about the subject to understand the risks and tackle it safely - you probably wouldn't be here asking us how they work.
