The 40-year-old is tied ninth at Baltusrol on four-under par after two rounds, five shots behind American leaders Jimmy Walker and Robert Streb.
Donaldson hit the winning shot for Europe in 2014 at Gleneagles and hopes to play this September at Hazeltine.
"Of course the Ryder Cup is at the back of my mind," he said.
"It is quite a long way back because I haven't been playing well enough to get in the team.
"But one week can change everything so a good weekend here and I am in good stead for a possible pick."
Europe skipper Darren Clarke has three wildcard selections for golf's showpiece team event between 30 September and 2 October.
A captain's pick is Donaldson's only realistic hope as he is 23rd in the 2016 Ryder Cup selection world points list and Clarke will announce his choices on 29 August after the Made in Denmark tournament.
Donaldson is ranked 80 in the world -  his lowest for five years - after just one top 10 finish in 2016 in Dubai, but is hoping a good weekend at this year's final major can transform his season.
Rookies currently occupy five of Europe's automatic qualifying spots as Clarke hopes to continue Europe's domination, beating the United States in six of the last seven Ryder Cups.
Donaldson, whose major tournament best is 7th at the 2012 US PGA Championship at Kiawah Island, tees off alongside American world number seven Rickie Fowler at 19:05 BST on Saturday.
World number one Jason Day, Open champion Henrik Stenson and two-time major winner Martin Kaymer are also on the leaderboard behind Walker and Streb.
Donaldson fired a round of one-under on day one at Baltusrol before shooting three-under on Friday to move into the top 10 - and he is hoping to continue that improvement on Saturday and Sunday.
"I'm just playing for me and trying to play better every day," he said.
"Friday was better than Thursday and if I can continue like that then we have a chance. I am pretty excited, the course is nice and weather hot, so two more rounds of the same quality would be nice."
Welsh golfer Jamie Donaldson says the chance of being a captain's pick for the Ryder Cup is helping inspire his efforts at the US PGA Championship.