Heat oil over medium-high heat in a large soup pot. Add onion and carrots and cook until softened, about 5 minutes. Add garlic and ham and cook, stirring, for another 30 seconds, until the garlic is fragrant. Add lentils, diced tomatoes, Italian seasoning, salt and pepper, bay leaves, and chicken broth.