The match saw the return of former Stanley manager John Coleman to the Crown Ground and his side got off to the perfect start, with George Donnelly putting Dale ahead in the first minute and Ashley Grimes making it 2-0 just after the half-hour mark.
But goals either side of half-time from Piero Mingoia and Romuald Boco levelled things up. However, Jason Kennedy's wonder goal seven minutes from time earned the visitors - and Coleman - a 3-2 win.
"I am bitterly disappointed that we lost," said Cook, who played for Accrington under Coleman. "We were 2-0 down before we knew it and then we got back into the game. For them to score a late goal was heartbreaking.
"We showed great character to come back from 2-0 down to make it 2-2, but to then lose it was hard to take. It would have been entertaining game to watch, it was played in a great spirit and all we can do is give credit to Rochdale.
"John (Coleman) and (Coleman's assistant) Jimmy (Bell) will have enjoyed their first trip back here. For us, we are conceding too many goals and have to work on that."