First, consider Galatians 6:7-8 - "Be not deceived; God is not mocked: for whatsoever a man soweth, that shall he also reap. For he that soweth to his flesh shall of the flesh reap corruption; but he that soweth to the Spirit shall of the Spirit reap life everlasting." Here we see the sowing and reaping principle. A person will reap what they sow. If they sow to the flesh, they will of the flesh reap corruption. This indicates that some of the bad that happens to us in life is simply reaping what we have sown.
Second, consider Romans 8:28 - "And we know that all things work together for good to them that love God, to them who are the called according to his purpose." This verse states that all things work together for good to them that love the Lord.
If I understand your question correctly, you are confused about how these two principles work together in a saved person. Perhaps, earlier in life someone has sown much to the flesh. Therefore, there must be reaping for that evil sowing. However, that person has now given his or her life to the Lord and are serving Him. In this case, God has promised them that all things will work together for good in their life. How can both of these be true at the same time?
First of all, although the Bible does teach that there is a natural law of sowing and reaping that takes place even in this life, we must not think that it is a complete accounting for all that we have done wrong. The Bible clearly states that if we sow to the flesh, we shall of the flesh reap corruption. We could see this in someone who spent years of his life drinking alcohol. He gets saved, but the diseases brought on by that sin do not go away. He still reaps what he has sown. This could be illustrated in many other ways.
However, we must understand that this is a general reaping. If we fully reaped for all our sins, then we would all be in hell. Although Zophar may have wrongly accused Job, his statement is certainly true of the rest of mankind: "Know therefore that God exacteth of thee less than thine iniquity deserveth" (Job 11:6). God is gracious and full of mercy. He does not take His children and continue to punish them for past sins. Yes, there are some natural sowing and reaping laws that He does not change even for believers. Some sins naturally lead to disease. Other sins destroy marriages and families. The Christian cannot bypass these laws of sowing and reaping. But God is not adding up all the past sins of anyone and making sure they pay for all of them. He forgives sin. He deals with His children in love. Even when He chastens them, He is doing so in order to bring them back to a right relationship with Him (Hebrews 12:9-12).
So, is the bad from the devil and the good from God? Not necessarily. God promises us (as per Romans 8:28) that all things work together for good. Notice, this verse does not say that everything that happens to us is good or will feel good. The apostle Paul experienced both the good and the bad as we understand them (Philippians 4:11-13). Yet, He knew that the Lord had all things worked out for the best.
If we cannot tell by our understanding what is good and what is bad, then how do we know that God is working all things together for good? We know by faith because we are to walk by faith (2 Corinthians 5:7). We must believe that God has a purpose for all things. Then, we can obey verses like Ephesians 5:20 - "Giving thanks always for all things unto God and the Father in the name of our Lord Jesus Christ." We can thank God for it because we know that He has a purpose for it. We can also be assured that all that He does with His children is motivated by love.
There is so much more in our walk with the Lord. I just cannot go into it now. Just rest assured that God truly loves His children and that He deals with them in love. Even the bad things (as we see them) are ways that He works in our lives for our good--if we love Him. Even chastening is designed to bring us to Him. Even if we are reaping something we sowed in the past, God still deals with us as His dear children and will work even that out to good. We simply need to fully trust in Him. May the Lord bless you as you grow in Him.