The US president hopes to ease his party's pain before next month's midterm elections, writes the BBC's North America correspondent.