I know a former Captain who became a type 1 diabetic in his early 40's. It was a huge surprise... the endocrinologist who treated him said you can get type 1 diabetes up until you are age 45.
He tried eating nothing but broccoli and steak for two months to see if he could control his blood sugar levels by diet alone. Unfortunately, he could not control his blood sugar level by diet alone and had to take insulin. It was tough to take his last flight, meant to be at age 60, at 42.
Unfortunately, if you are an insulin dependent diabetic, the best you can do is a third class medical. My friend received one through the very diligent efforts of ALPA Medical.
He is now putting his years of knowledge and skill to work as an instructor for a major airline.
I understand other countries have different rules towards type 1 diabetes. I believe you can fly transport category aircraft in Canada if you are a type 1 diabetic.
Good luck.