Instead of always adding page 2 to the detail url of a product you have add the page number that is in the get parameters (meaning in the url) of the overview page. And if there is no page number in the url, then the page is 1 or you leave the entire ?p=....
Unfortunately I don’t know enough about Magento templating yet that I could give you any precise hints on how exactly to achieve that.
In general PHP I would do something like this to get the page number and then I would add this page number to the links that point to the detail pages of the listed products.
$currPageNum = !empty($_GET['p']) ? $_GET['p'] : 1;