have you been to your doctors?? I know this problem is embarrassing to talk to someone face to face about but really dude, how else are you going to get to the bottom of this problem?
You must be really strict with yourself and make sure you find the source of your probelm. don't just do something for about a few days to a week and give up. you have to test things out. like eat foods that you think is the problem then elimante them from your diet and see if you notice a difference. it may take a long time to solve you probelm but it will be worth it when you don't have to suffer from this B.O.
But really go talk to your doctor and tell him/her that this is seriously affecting you.