Donaldson's second in the 71st minute had Brentford back in front at 3-2 before Forshaw's penalty made up for Cole Stockton's equaliser in the 90th minute.
Brentford returned to winning ways after last weekend's 4-0 reverse at Bradford but Rosler insists they need to be tougher to avoid such late drama in the future.
"The goals we conceded were down to a lot of inexperience and we panicked, so we have to improve our composure," he said.
"We didn't want to commit as much and we are not yet strong enough mentally to overcome periods in the game where the opposition pressure us a little bit. We have to be more confident so we continue with the good play we have shown.
"We are doing a lot of things right and nobody can question our appetite to win games, though. We never gave up and overall I think we were the better team and deserved the three points on the balance of the 90 minutes.
"We are delighted with the win because it proves we are carrying on the good run we enjoyed at the end of last season.
"We played to our strengths and we played to their weaknesses but when we stopped doing that, that was when we allowed Tranmere to get back in the game."
- Sports & Recreation
- Clayton Donaldson
- Adam Dugdale
- Adam Forshaw