The most important experience your middle child needs is your consistent, constant and unconditional love, support, and attention given to him.
Reward and compliment him when he does something good, and provide him with ways to get motivated through this.
Bring him out on special "dates" with you. For example, set aside a time to go and do something together one on one. Even if it's just going out to eat a quick lunch or dessert or something, the time together will count.