Hopefully, a physical therapist will chime in here. I'm not a PT, but I've spent, in aggregate, a year working closely with two PTs specifically on my back, and in particular my mid back, so I know more than the average bear. Here are some of the things they've had me doing and what they've taught me. I know well the leaning thing that you speak of. As I've gotten stronger, it's gotten better.
Note: Initially, you will want/need to do the modified version of this, which is to bend your knees -- don't have straight legs.
-- Range of motion exercises for back (a.k.a. "cat/cow" from yoga, if you're familiar...):
-- I don't know if you have access to a gym somehow, but if you do, this is my very favorite exercise to do (feels so good on my back!):
seated lat pulldown:
I chose this video because it shows really well which muscles are working -- right at the area you are talking about.
(Note that there are other ways to do a lat pulldown if you can't get to a gym; look up on YouTube.)
-- **Very important!: The stronger your stomach is, the more it will support your back. I suspect your core is quite weak. You will want to look for various core exercises to you can do. I can't stress how important this is.
Here is one:
-- I LOVE using the stability ball (inexpensive to get one). There are a surprising number of exercises you can do with this thing. Especially good for core/back work:
many more videos to explore
-- Excellent video that helped me a lot, in the early stages. Very relaxing and gentle. (Fair warning: Might be geared a little too much toward rehab/alleviation of pain/post surgery for you, though; not sure)
"Back In Shape"