I wake up every day with back and neck pain, have done every day since a 2001 car wreck busted up six vertebrae from my tailbone to atlas. Some days are worse than others. Today was pretty bad so I rested.
Before I get out of bed I do gentle stretches, all the usual stuff the physical therapists give us sketches for and expect us to do on our own.
My usual pre-ride breakfast is coffee, ibuprofen -- sometimes magnesium salicylates like Doan's pills -- and alternating between an ice pack and analgesic cream massages with salicylates, menthol, eucalyptus, etc. Sometimes it takes a couple of hours before it eases up enough to ride.
The first 15 minutes usually range from uncomfortable to outright painful. After that things ease up. Then I try a few short sprints up to 10 seconds, climb out of the saddle for some warmup hills, then ease back for a few minutes to see how I feel. Then, if all goes well, the endorphins or body voodoo kicks in and I feel better. The pain vanishes. That usually lasts most of the day if I'm lucky.
Then I start over again the next day.
But I don't ride every day. More like 4-5 days a week now. My body tells me when I need a rest, although it's decreased from two or three days off to one day off the bike. And I stop about every 10 miles to stretch my neck and back and massage the neck and shoulders. Helps.
A couple of years ago I made concessions to limited mobility with a comfort hybrid, then a more sporty hybrid with riser bars. Tonight, after a year on the sporty hybrid with riser bars, I swapped to flat bars. Tomorrow I'll see how it goes. Should be okay -- I've mostly been riding a road bike with drops the past two months. It was painful the first two weeks and I swore every ride to sell the damned thing. Then not so bad the third and fourth weeks. Now I look forward to it. But the hybrid is a cushier ride and nearly as fast, although it was held back by wind resistance from the riser bars.
Just keep trying, stay within the limits suggested by your doctor. And if you have a physical therapist, he/she will probably urge you to push a little harder than you're comfortable with.