You seem to be having a mechanical reason for your problem, which needs to be addressed after a posture evaluation. Your Physiotherapist will educate you on basic biomechanics involved with your condition and will advice you with posture awareness and therapeutic exercises. Often it's a long term goal to achieve total control over the condition and your motivation is as important as the advices given.
Next Steps
Consult with a Physiotherapist and share your detailed history of the condition along with aggravating and relieving factors which will help in gaining more clues on your condition.
Health Tips
Keep in mind that initially it's back pain management rather than cure, which is focused first so as to reduce the frequency of back pain episodes. Later you can achieve total control and cure from the ailment. Meanwhile avoid what all pain increasing postures you've observed. Use ergonomic back/chair supports and avoid use of over the counter back pain belts.